SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Can I write two onclick ?
-
Jan 9, 2007, 14:54 #1
- Join Date
- Aug 2006
- Posts
- 266
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can I write two onclick ?
Can I write two onclick ?
<input onclick="return confirm('Çıkmak istiyormusunuz ')" onclick="window.location='logout.asp';"
Code:<input onclick="return confirm('Çıkmak istiyormusunuz ')" onclick="window.location='logout.asp';" type="button" value="Çıkış" style="cursor:hand; background='#efefef';" onmouseover="this.style.background='#ffffff';" onmouseout="this.style.background='#efefef';" name="uyemiz_logout"> </td>
-
Jan 9, 2007, 15:24 #2
- Join Date
- Sep 2005
- Location
- Tanzania
- Posts
- 4,662
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
No, you have to put those in the same one:
Code:<input onclick="return confirm('Çıkmak istiyormusunuz '); window.location='logout.asp';" type="button" value="Çıkış" style="cursor:hand; background='#efefef';" onmouseover="this.style.background='#ffffff';" onmouseout="this.style.background='#efefef';" name="uyemiz_logout"> </td>
-
Jan 9, 2007, 15:42 #3
- Join Date
- Aug 2006
- Posts
- 266
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks. Now I have no doubt about it.
-
Jan 10, 2007, 04:42 #4
- Join Date
- May 2006
- Posts
- 28
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
if you have more complex task you can call some function on onclick event
onclick="myFunction();"
-
Jan 10, 2007, 05:02 #5
- Join Date
- Aug 2006
- Posts
- 266
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for your help.
This does, what I want:
Code:<input onclick="if(confirm('Çıkmak istiyor musunuz? ')) location='logout.asp' " type="button" value="Çıkış" style="cursor:hand; background='#efefef';" onmouseover="this.style.background='#ffffff';" onmouseout="this.style.background='#efefef';" name="uyemiz_logout">
Bookmarks