Log in

View Full Version : Link to Us Form



kaos
09-19-2009, 09:36 PM
hey everyone!

my site uses an iframe and, therfore, you cannot bookmark a specific page. i'm trying to make a form that will let the user type the article and the page number of it and it will give them a special url.

For example:


<form id="link" name="link">
Article: <input type="text" id="article" name="article">
Page: <input type="text" id="page" name="page">
GO: <input type="submit" value="Get URL" onClick="link()">
URL: <input type="text" id="link-page" name="link-page">
</form>

my script:

var article = document.getElementById('article');
var page = document.getElementById('page');
var link-page = document.getElementById('link-page');

if (article.value = "hiwatt")
{
link-page.value="http://www.domain.com/page7.html";
}

else {alert("Article" + article+ "Doesn't Exist!")}


what's wrong?