|
|
I have a javascript variable named akTargetDesc on a webpage which i would like to use as a query word with google. Here is a link to my script if you wanna take a look:
Here is a snippet from the script
var linky = document.createElement('div');
var targetElement = document.getElementById('new_left'); //removes navigation links from LHS
|
|
|
The way you've got it there, instead of the value of akTargetDesc being put into your link, it'll search for akTargetDesc. Because it's within the string, marked by quotes, the Javascript parser won't know that it's supposed to be a variable.
|
|
|
I know. I just put the link like that so you guys would know where i wanted the variable value to be.
I found a workaround by copying Metadata from the webpage to my script as I was unable to copy javascript variables. Thanks for the quick response buddy... |
|
|
If you want a variable declared in the content of the page, you should use |