• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Another simple Javascript question..sending a variable from a link to a .js file

you can get the url params in javascript, but from what i remember you have to parse the url manually (or at least methodically)
 
You can get the param using a parser function like:

function QueryStringParam( name )
{
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var tmpURL = window.location.href;
var results = regex.exec( tmpURL );

if( results == null )
{
return "";
}
else
{
return results[1];
}
}

So:

window.open('http://wharg.com/blah.jsp?seller=' + QueryStringParam('id'), features);
 
Well, just like with the other question, there are some misconceptions here too 🙂
You can not have a hyperlink to a .js file. If you do, the browser will prompt your user to either open or save the file to their computer. JS files are not associated with web browsers. On windows computers, for example, they are associated with wshost (Windows Script Host). Even if the user chooses to open the file from the browser, it would still first launch the script host and then run your file, which is, I am sure, not something you were planning on. Tell us what your scenario is and what are trying to achieve.
 
Back
Top