Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie - passing arguments

Status
Not open for further replies.

Borrmaskin

Programmer
Jan 22, 2003
5
GB
This is what i got:
---------------------------
<SCRIPT LANGUAGE = &quot;JavaScript&quot;>
function ConFirm() {
if (confirm(&quot;Do you want to delete this?&quot;)) {
window.open(&quot;TODO.php&quot;,&quot;_self&quot;);
}
}

</script>

<a href=&quot;#&quot; onmousedown=javascript:ConFirm();&quot;>
<img src=&quot;gfx/checked.gif&quot; width=&quot;30&quot;>
</a>
-----------------------------
I want to pass the argument URL to the function.
And perhaps it would be nice to pass different messages.
Can that be done?
 
<SCRIPT LANGUAGE = &quot;JavaScript&quot;>
function ConFirm(x) {
if (confirm(&quot;Do you want to delete this?&quot;)) {
window.open(x,&quot;_self&quot;);
}
}

</script>

<a href=&quot;#&quot; onmousedown=javascript:ConFirm(TODO.php);&quot;>
<img src=&quot;gfx/checked.gif&quot; width=&quot;30&quot;>
</a>

Does that work?

BatGrrrL
 
Nope...
What happends is thst i no longer get the confirm-box,
and thats all...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top