I have a submit button with a onClick:
<div id="messageDiv">
<form>
<textarea name="message" rows="10" cols="20"></textarea></textarea>
<br /><br />
<input type="submit" value="Send" onClick="sendmail()">
<input type="reset" value="Reset" name='reset'>
</form>
</div>
then I have my sendmail:
function sendmail()
{
window.location.href = "http://www.rainbowcode.net/index.php/profiles/mail?="+mailid;
window.location('http://www.rainbowcode.net/index.php/profiles/mail?='+mailid);
//return true;
}
mailid
is a global variable that gets set in another JS function and it does contain the correct value. How come window.location
is not opening my page?
If I manually open it with a mailid it works fine..
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…