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!

DHTML Form message 1

Status
Not open for further replies.

JennyW

Technical User
Mar 1, 2001
323
CA
I found I dhtml script I want to use for one of my forms.

The script disables the Form’s “Submit” button after it is selected.
Here’s where I got the script…


Now, here’s my problem. When I press the “Submit” button on my Form I want a message to display beneath the “Submit” button.

Blinddate.com has an example of the type of function I’m looking for.
At the bottom of the screen there’s a Form button – “Search All Ads”, when selected a message appears below the button displaying…
[tt]Search For Personals & Friends In Progress. [/tt]

Here’s Blinddate’s url…

Does anyone know how I can make my Form do this?

Thanks for reading,
Jenny
 
try using the display properties of a div tag like this

<form id=form1 name=form1><input type = &quot;button&quot; value = &quot;print msg&quot; onclick = &quot;msg.style.display = 'block'&quot; id=button1 name=button1></input></form>

<div id=&quot;msg&quot; style = &quot;display:none&quot;>message
</div>

good luck!
Liz
 
Hi,
I tried applying your code to my [tt]Form[/tt], but was unsuccessful.

My Forms’ interacting with a [tt].cgi[/tt] script and when I apply your code my Form won’t work. I’m gonna keep trying to figure out the problem.

Thanks,
Jenny
 
Try wrapping that input tag with a span tag that has a js onclick event that makes that msg div tag display - like this

<form id=form1 name=form1><span onclick = &quot;msg.style.display = 'block'&quot;><input type = &quot;button&quot; value = &quot;print msg&quot; id=button1 name=button1></span></form>

<div id=&quot;msg&quot; style = &quot;display:none&quot;>message
</div>


Liz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top