/    Sign up×
Community /Pin to ProfileBookmark

passing form variables

I am trying to pass variables to a second page and must be forgetting something… Please help… Below is the code

[B]thumbView.html Code:[/B]

<script language=”JavaScript”>

function imageViewPage() {
var val1 = “”
var val2 = “”
imageChoice.imageName.value = val1
imageChoice.imageFile.value = val2
imageChoice.submit()
}

</script>

<form name=”imageChoice” action=”imageView.html” method=”POST”>
<input name=”imageName” type=”hidden” value=”Thumb 001.1″>
<input name=”imageFile” type=”hidden” value=”thumb001.1.jpg”>
<input type=”image” name=”Submit” src=”images/thumb001.1.jpg” width=”150″ height=”125″ alt=”” border=”0″ onClick=”imageViewPage()”>
</form>

[B]imageView.html Code:[/B]

<script language=”JavaScript”>
document.write(“&nbsp;<img src=’images/”+imageFile+”‘ width=’450′ height=’375’ alt='”+imageName+”‘ border=’0’>&nbsp;”) </script>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@sackermanauthorJan 21.2003 — That worked wonderfully...

Thanks for the help,

Steve
×

Success!

Help @sackerman 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.17,
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,
)...