HighDots Forums  

DEAD EASY - NEED JAVASCRIPT HELP !!!

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss DEAD EASY - NEED JAVASCRIPT HELP !!! in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Miner Willy
 
Posts: n/a

Default DEAD EASY - NEED JAVASCRIPT HELP !!! - 02-04-2006 , 08:26 AM






Hello guys and gals.

I know nothing about programming in Javascript at present and was wondering
if you could help me.

Basically I have a function called 'showhide' and I have a variable passed
from the previous page to the current page.

The variable is called 'flash' and flash=1 if the user has selected to view
the site without flash movies.

'showhide' simply removes the Flash movie from the page.

Anyway, so the variable 'flash=1' is passing from the previous page
successfully as I can see it in the URL. What I'd like to know is what code
to use to run the function 'showhide' if flash=1.

If any of you guys can help me that would be great. I know the solution must
be really easy but I can't seem to find an answer on the web.

Thanks in advance.

Marc



Reply With Quote
  #2  
Old   
Randy Webb
 
Posts: n/a

Default Re: DEAD EASY - NEED JAVASCRIPT HELP !!! - 02-04-2006 , 11:56 AM






Miner Willy said the following on 2/4/2006 9:26 AM:
Quote:
Hello guys and gals.

I know nothing about programming in Javascript at present and was wondering
if you could help me.
The best "help" you could get would be to be told to read the manual.

Quote:
Basically I have a function called 'showhide' and I have a variable passed
from the previous page to the current page.
Whats the function code?

Quote:
The variable is called 'flash' and flash=1 if the user has selected to view
the site without flash movies.

'showhide' simply removes the Flash movie from the page.
Do it the other way. Instead of removing the Flash movie, add it.

Quote:
Anyway, so the variable 'flash=1' is passing from the previous page
successfully as I can see it in the URL. What I'd like to know is what code
to use to run the function 'showhide' if flash=1.
Check the queryString for flash=1 and if it is there, add the flash movie.

alert(document.location.queryString)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Reply With Quote
  #3  
Old   
Miner Willy
 
Posts: n/a

Default Re: DEAD EASY - NEED JAVASCRIPT HELP !!! - 02-04-2006 , 06:39 PM



Cheers mate - but that doesn't really help me at all. I have no knowledge of
Javascript, and have no interest in learning it - I just have the need to
use a script for this. All I need is a couple of lines of arbitrary code to
call a function if a variable = 1.

This is for online learning content in a remote area with limited access to
one to one tuition. I'm not trying to make a million off somebody else's
code.

If anybody could post an answer that would be great.

Thanks.

"Randy Webb" <HikksNotAtHome (AT) aol (DOT) com> wrote

Quote:
Miner Willy said the following on 2/4/2006 9:26 AM:
Hello guys and gals.

I know nothing about programming in Javascript at present and was
wondering if you could help me.

The best "help" you could get would be to be told to read the manual.

Basically I have a function called 'showhide' and I have a variable
passed from the previous page to the current page.

Whats the function code?

The variable is called 'flash' and flash=1 if the user has selected to
view the site without flash movies.

'showhide' simply removes the Flash movie from the page.

Do it the other way. Instead of removing the Flash movie, add it.

Anyway, so the variable 'flash=1' is passing from the previous page
successfully as I can see it in the URL. What I'd like to know is what
code to use to run the function 'showhide' if flash=1.

Check the queryString for flash=1 and if it is there, add the flash movie.

alert(document.location.queryString)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/



Reply With Quote
  #4  
Old   
Randy Webb
 
Posts: n/a

Default Re: DEAD EASY - NEED JAVASCRIPT HELP !!! - 02-04-2006 , 07:42 PM



Miner Willy said the following on 2/4/2006 7:39 PM:
Quote:
Cheers mate - but that doesn't really help me at all. I have no knowledge of
Javascript, and have no interest in learning it - I just have the need to
use a script for this. All I need is a couple of lines of arbitrary code to
call a function if a variable = 1.

This is for online learning content in a remote area with limited access to
one to one tuition. I'm not trying to make a million off somebody else's
code.

If anybody could post an answer that would be great.

Thanks.
if (document.location.indexOf('flash=1'){showhide();}

There ya go.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?


Reply With Quote
  #5  
Old   
Miner Willy
 
Posts: n/a

Default Re: DEAD EASY - NEED JAVASCRIPT HELP !!! - 02-05-2006 , 04:11 AM



Cheers - that's great.

Sorry if I sounded a bit obnoxious with my last post - I was half bladdered
when I came back from the pub last night and probably sounded rude - it
wasn't intentional.

Thanks for your help, I appreciate it.

Marc

"Randy Webb" <HikksNotAtHome (AT) aol (DOT) com> wrote

Quote:
Miner Willy said the following on 2/4/2006 7:39 PM:
Cheers mate - but that doesn't really help me at all. I have no knowledge
of Javascript, and have no interest in learning it - I just have the need
to use a script for this. All I need is a couple of lines of arbitrary
code to call a function if a variable = 1.

This is for online learning content in a remote area with limited access
to one to one tuition. I'm not trying to make a million off somebody
else's code.

If anybody could post an answer that would be great.

Thanks.

if (document.location.indexOf('flash=1'){showhide();}

There ya go.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.