• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

calling java Script functin with in external jsp files  RSS feed

 
Ranch Hand
Posts: 174
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a js file in separate place.
It is icon.js

I have two separate jsp files too.
icon.jsp
[code=java
<html>

    <head>
       
        <script src="js/icon.js"></script>
       
</head>
    <body>
      

            <input type="image" class="btn" id="home" name="home" style="float: left" src="img/home.png" >
            <input type="image" class="btn" id="user" name="user" style="float: right; margin-left: 100px" src="img/user.png" >

            <input type="image" class="btn" id="delete" name="delete" style="float: right; margin-left: 40px" src="img/delete.png" onclick="deleteRow('dataTable')" disabled >
            <input type="image" class="btn" id="save" name="save" style="float: right; margin-left: 40px" src="img/save.png" onclick="readDataToSave('dataTable');" disabled >
            <input type="image" class="btn" id="modify" name="modify" style="float: right; margin-left: 40px" src="img/modify.png" onclick="modifyRow('dataTable')"disabled>
            <input type="image" class="btn" id="add" name="add" style="float: right; margin-left: 40px" src="img/add.png" onclick="clickSearch();addRow('dataTable');">
           

    </body>
</html>
[/code]

please don't mind about styles and other onclick functions...

next jsp file is
search.jsp


I want is this.

1.when i click add button only save button must be enable
2.when I click search button all save ,delete and modify buttons must be enable and add is disabe.

but when i run this only first task is success.But 2nd one???
 
chamini prashakthi
Ranch Hand
Posts: 174
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeh found the soluion
It was my mistake of


i add it with correct path.
now it is fine...


But now problem is when i click search button the buttons were suddenly enable and again become disable state.
Can soe one have a solution for this???
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!