/    Sign up×
Community /Pin to ProfileBookmark

Can I write two onclick ?

Can I write two onclick ?
<input [color=red]onclick[/color]=”return confirm(‘Ç&#305;kmak istiyor musunuz ‘)” [color=red]onclick[/color]=”window.location=’logout.asp’;”

[code]
<input onclick=”return confirm(‘Ç&#305;kmak istiyormusunuz ‘)” onclick=”window.location=’logout.asp’;” type=”button” value=”Ç&#305;k&#305;&#351;” style=”cursor:hand; background=’#efefef’;” onmouseover=”this.style.background=’#ffffff’;” onmouseout=”this.style.background=’#efefef’;” name=”uyemiz_logout”>&nbsp; &nbsp; &nbsp;</td>
[/code]

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@mjdamatoJan 09.2007 — You put them inside the same "ionclick" separated by semicolons:
&lt;input
onclick="return confirm('Ç&amp;#305;kmak istiyormusunuz ');window.location='logout.asp';"
type="button" value="Ç&amp;#305;k&amp;#305;&amp;#351;"
style="cursor:hand; background='#efefef';"
onmouseover="this.style.background='#ffffff';"
onmouseout="this.style.background='#efefef';" name="uyemiz_logout"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/td&gt;
Copy linkTweet thisAlerts:
@mrhooJan 09.2007 — However you code it, after you click any button in the confirm dialog it's going to load 'logout.asp'.

Did you want a particular return value from the confirm to call the onload?

onclick="function(){if(confirm('Ç&#305;kmak istiyormusunuz ')) location='logout.asp'}"
Copy linkTweet thisAlerts:
@samanyoluauthorJan 10.2007 — Thanks for your answer.

I don't know, why the following code don't work:
<br/>
onclick="function(){if(confirm('Ç&amp;#305;kmak istiyor musunuz? ')) location='logout.asp'}"

I deleted red text.

onclick="[color=red]function(){[/color]if(confirm('Ç&#305;kmak istiyor musunuz? ')) location='logout.asp'[color=red]}[/color]"

It did work.
<br/>
&lt;input onclick="if(confirm('Ç&amp;#305;kmak istiyor musunuz? ')) location='logout.asp' " type="button" value="Ç&amp;#305;k&amp;#305;&amp;#351;" style="cursor:hand; background='#efefef';" onmouseover="this.style.background='#ffffff';" onmouseout="this.style.background='#efefef';" name="uyemiz_logout"&gt;
×

Success!

Help @samanyolu spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...