JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2061
Number of posts: 5164

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
so again.......... my problem remains.! Posted by praneeth on 25 Jul 2003 at 10:40 AM
hello ppl,

so no one has yet gien me a good solution, so here it goes,...

can any one tell me how i can pass parameters to an array that resides in an external .js file.

i mean the js file contains the array defination and i need to send the array values as parameters from with in the HTML file i am calling the script from......................

if u know , do post a reply,............... if u dont ...... then plz dont waste my time.

Report
Re: so again.......... my problem remains.! Posted by lillu on 26 Jul 2003 at 1:03 PM
Hi,

BTW, I don't remember your last post before this one but I may have a solution for this question.

When you have an external .js file you want to pass values to, the best way is to insert <script language="JavaScript">yourFunction(yourVar) </script> where you want to call your script. Javascript will pass yourVar in the yourFunction function in your external .js file eg. like this:

function yourFunction(yourVar)
{
document.write(myVar);
}

HTH,

Lillu

: hello ppl,
:
: so no one has yet gien me a good solution, so here it goes,...
:
: can any one tell me how i can pass parameters to an array that resides in an external .js file.
:
: i mean the js file contains the array defination and i need to send the array values as parameters from with in the HTML file i am calling the script from......................
:
: if u know , do post a reply,............... if u dont ...... then plz dont waste my time.
:
:

Report
Re: so again.......... my problem remains.! Posted by Virtua Knight on 26 Jul 2003 at 9:42 PM
ummmm, try this:
<script language="javascript">
param1="example";
param2="test";
</script>
<script language="javascript" src="yourscript.js"></script>


: hello ppl,
:
: so no one has yet gien me a good solution, so here it goes,...
:
: can any one tell me how i can pass parameters to an array that resides in an external .js file.
:
: i mean the js file contains the array defination and i need to send the array values as parameters from with in the HTML file i am calling the script from......................
:
: if u know , do post a reply,............... if u dont ...... then plz dont waste my time.
:
:


http://www.ocdn.fairmount.nu/ - Omnisoft - Quality webmaster scripts and services.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.