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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling functions outside of the document.write

Status
Not open for further replies.

subzero2k35

Technical User
Joined
Nov 10, 2001
Messages
3
Location
GB
Ok

I need to call a function outside of document.write, which is back in the main script.

i.e

<html>
<script language = &quot;javascript&quot;>


function second(value) {
alert(value)
}

function first(value) {
document.open()
document.write('<a href=&quot;#&quot; &quot;)
document.writeln('onClick=&quot;i_want(value)&quot;>BUTTON</a>')
document.close()

<html>

....... call function (where_i_am) with (value)

<a href=&quot;#&quot; onClick=&quot;first(10);&quot;>BUTTON&quot;</a>

</html>

how do i do this and rememeber value??

Thanks

Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top