Gossamer Forum
Home : General : Internet Technologies :

Using DIV to hide form is Javascript not enabled in browser - How?

Quote Reply
Using DIV to hide form is Javascript not enabled in browser - How?
Hi All

I've heard that you can use the DIV tag somehow to hide a form if javascript is not enabled in the browser.

How would this be done?

I use a lot of javascript form validation stuff and would like to prevent anyone from using the forms unless they have javascript enabled

Thanks so much Smile
Quote Reply
Re: [DogTags] Using DIV to hide form is Javascript not enabled in browser - How? In reply to
Maybe <noscript> ?

Think the formats like;

<script>sdo stuff here</script>
<noscript>show normal HTML here, if scripts are turned off =)</noscript>

Hope that helps :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [DogTags] Using DIV to hide form is Javascript not enabled in browser - How? In reply to
This isn't the DIV solution your looking for but it may help or give some ideas...

http://javascript.internet.com/user-details/javascript-enabled-redirect.html

The description mentions something about <noscript>.

I have a form that uses the DIV tag to hide certain boxes, but I don't know how it'd affect JavaScript.

Lemme look at my form, and I'll see...
Quote Reply
Re: [DogTags] Using DIV to hide form is Javascript not enabled in browser - How? In reply to
... yes you can.

My form uses layers and then a chunk of javascript to "hide" a text area box (unless someone selects that option on a pull down). With JavaScript (active scripting) disabled in IE then the text area box remains hidden regardless of the selected item.

The javascript I based mine on is here:
http://javascript.internet.com/forms/dynamic-input.html
Quote Reply
Re: Using DIV to hide form is Javascript not enabled in browser - How? In reply to
Thanks, all. I'll see what I can come up with

Cheers Smile

Last edited by:

DogTags: Sep 12, 2005, 12:28 PM