Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

calling java Script functin with in external jsp files  RSS feed

 
chamini prashakthi
Ranch Hand
Posts: 118
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: 118
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???
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!