Jump to content

Help - Showing Hidden Span on Submit?


skot

Recommended Posts

Hi

 

I've been trying to use javascript to show a hidden span containing instructions when a form is submitted with no luck so far..

 

Basically when the form is submitted, onclick should run a couple of functions, one sets the button text to read something else and the other should show instructions hidden in a span with style="display:none".

 

The button is renamed on clicking, but I cannot get the hidden span to show up. What am I doing wrong? I've tried various things including trying to get function remoteConnect() to unhide the span or getting it to run function showSpan(answer1)..

 

Button:-

<input name="submit" type='submit' class="connectbutton" style="border: 1px groove rgb(0, 0, 0); text-align: center; background-color:#FFCC00; width:200px" value='Connect to Support' onclick="remoteConnect(); showSpan('answer1'); return false;" />

 

Javascript:-

<script language="JavaScript">
function remoteConnect() {
document.channel296606886.submit.value = 'Loading.. Please wait..';
document.channel296606886.submit();
}
</script>

<script language="JavaScript">
function showSpan(id) {
document.getElementById(id).style.display = 'block';
}
</script>

 

Hidden Span:-

<span id="answer1" style="display:none">
<p class="boxontop style15 style16 style17">Select 'Open' followed by 'Run' when prompted</p>
</span>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.