Hi,
I’m trying to get a variable that I get from a PHP-script to be a link in a textfield.
Right now I’m using an html tag to make a link to the information I want to display…
This works but I think its not good enough… I want to get a “rollOver” function on the Headline instead of a new line that says click me.
The following code displays in the textfield “content”:
News
Headline <–Headline from the database
Teaser <-- Text from the database
**Click me <-- Html link that displays the full text in a textfeild called “info” **
Headline
Teaser
Click me
…
function act(paramString) {
var params = paramString.split("#");
content.htmlText(params[0]);
info.htmlText = unescape(params[1]); }
function showValues() {
content.text = "News
";
for (i=0; i < this.n; i++){
content.htmlText += this["headline"+i] + this["teaser"+i] + "<br>" + "<a href='asfunction:act," + this["actId"+i] + "#" + escape(this["text"+i])
+"'> <font color='#000000'>Click this link</font></a><br><br>";
}
}
var c = new LoadVars();
c.onLoad = showValues;
c.load("my_PHP_fil.php");
stop();
I want it to look like this:
News
Headline
Teaser
Headline
Teaser
…
And the text in the headline should be the link…
Please help me!
/Marcus