www.webdeveloper.com
Results 1 to 4 of 4

Thread: Whats wrong?

  1. #1
    Join Date
    Jan 2004
    Location
    UK
    Posts
    248

    Unhappy Whats wrong?

    Hi again!

    One my site, i have two frames. the top one is name 'T' and the bottom is 'B'.
    Now, when one page is loaded into the bottom frame, everything is fine.
    Now, when i click a new link in the bottom frame (So the bottom frame page changes) an arror message appears saying Syntx error!!!!! whats wrong? there is definetaly nothing wrong with the bottom pages script. Here are the scripts :


    TOP FRAME SCRIPT
    <html><head><title>NEW RPG GAME</title>
    <script language="javascript">
    </script>
    <style>
    body,html {
    cursor: hand;
    scrollbar-base-color:yellow;
    }
    a {color:yellow; text-decoration:none}
    a:hover {color:lime; text-decoration:none}
    </style>
    </head>
    <body bgcolor=" blue" text="yellow">
    <bgsound src="dragon tail.mid">
    <script language="javascript">
    function u11() {
    var topboxvalue11 = parent.T.others.other11.value;
    if(topboxvalue11 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue11 == "potion") {
    potion();
    parent.T.others.other11.value = "";
    }
    else {
    if(topboxvalue11 == "super potion") {
    alert("super potion");
    parent.T.others.other11.value = "";
    }
    else {
    }
    }
    }
    }


    function u12() {
    var topboxvalue12 = parent.T.others.other12.value;
    if(topboxvalue12 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue12 == "potion") {
    potion();
    parent.T.others.other12.value = "";
    }
    else {
    if(topboxvalue12 == "super potion") {
    alert("super potion");
    parent.T.others.other12.value = "";
    }
    else {
    }
    }
    }
    }

    function u13() {
    var topboxvalue13 = parent.T.others.other13.value;
    if(topboxvalue13 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue13 == "potion") {
    potion();
    parent.T.others.other13.value = "";
    }
    else {
    if(topboxvalue13 == "super potion") {
    alert("super potion");
    parent.T.others.other13.value = "";
    }
    else {
    }
    }
    }
    }

    function u14() {
    var topboxvalue14 = parent.T.others.other14.value;
    if(topboxvalue14 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue14 == "potion") {
    potion();
    parent.T.others.other14.value = "";
    }
    else {
    if(topboxvalue14 == "super potion") {
    alert("super potion");
    parent.T.others.other14.value = "";
    }
    else {
    }
    }
    }
    }

    function u15() {
    var topboxvalue15 = parent.T.others.other15.value;
    if(topboxvalue15 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue15 == "potion") {
    potion();
    parent.T.others.other15.value = "";
    }
    else {
    if(topboxvalue15 == "super potion") {
    alert("super potion");
    parent.T.others.other15.value = "";
    }
    else {
    }
    }
    }
    }

    function u16() {
    var topboxvalue16 = parent.T.others.other16.value;
    if(topboxvalue16 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue16 == "potion") {
    potion();
    parent.T.others.other16.value = "";
    }
    else {
    if(topboxvalue16 == "super potion") {
    alert("super potion");
    parent.T.others.other16.value = "";
    }
    else {
    }
    }
    }
    }

    function u17() {
    var topboxvalue17 = parent.T.others.other17.value;
    if(topboxvalue17 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue17 == "potion") {
    potion();
    parent.T.others.other17.value = "";
    }
    else {
    if(topboxvalue17 == "super potion") {
    alert("super potion");
    parent.T.others.other17.value = "";
    }
    else {
    }
    }
    }
    }

    function u18() {
    var topboxvalue18 = parent.T.others.other18.value;
    if(topboxvalue18 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue18 == "potion") {
    potion();
    parent.T.others.other18.value = "";
    }
    else {
    if(topboxvalue18 == "super potion") {
    alert("super potion");
    parent.T.others.other18.value = "";
    }
    else {
    }
    }
    }
    }

    function u19() {
    var topboxvalue19 = parent.T.others.other19.value;
    if(topboxvalue19 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue19 == "potion") {
    potion();
    parent.T.others.other19.value = "";
    }
    else {
    if(topboxvalue19 == "super potion") {
    alert("super potion");
    parent.T.others.other19.value = "";
    }
    else {
    }
    }
    }
    }

    function u20() {
    var topboxvalue20 = parent.T.others.other20.value;
    if(topboxvalue20 == "") {
    alert("no item available");
    }
    else {
    if(topboxvalue20 == "potion") {
    potion();
    parent.T.others.other20.value = "";
    }
    else {
    if(topboxvalue20 == "super potion") {
    alert("super potion");
    parent.T.others.other20.value = "";
    }
    else {
    }
    }
    }
    }

    function potion() {
    var php = parent.T.data1.hp.value;
    var php2 = parseInt(php);
    var xtrahp = 10;
    var total = (php2) + (xtrahp);
    parent.T.data1.hp.value = (total);
    }

    function superpotion() {
    var phps = parent.T.data1.hp.value;
    var phps2 = parseInt(phps);
    var xtrashp = 50;
    var total2 = (phps2) + (xtrashp);
    parent.T.data1.hp.value = (total2);
    }
    </script><table align="right"><tr><td>
    <center>Other items found<br>&nbsp;<br>
    Key items ///////////////////////////// items
    <br><table border="0" align="left">
    <form name="others">
    <tr><td><input type="text" name="other1" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete11()"><input type="text" name="other11" value="" readonly><button value="use" onClick="u11()">Use</td></tr>
    <tr><td><input type="text" name="other2" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete12()"><input type="text" name="other12" value="" readonly><button value="use" onClick="u12()">Use</td></tr>
    <tr><td><input type="text" name="other3" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete13()"><input type="text" name="other13" value="" readonly><button value="use" onClick="u13()">Use</td></tr>
    <tr><td><input type="text" name="other4" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete14()"><input type="text" name="other14" value="" readonly><button value="use" onClick="u14()">Use</td></tr>
    <tr><td><input type="text" name="other5" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete15()"><input type="text" name="other15" value="" readonly><button value="use" onClick="u15()">Use</td></tr>
    <tr><td><input type="text" name="other6" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete16()"><input type="text" name="other16" value="" readonly><button value="use" onClick="u16()">Use</td></tr>
    <tr><td><input type="text" name="other7" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete17()"><input type="text" name="other17" value="" readonly><button value="use" onClick="u17()">Use</td></tr>
    <tr><td><input type="text" name="other8" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete18()"><input type="text" name="other18" value="" readonly><button value="use" onClick="u18()">Use</td></tr>
    <tr><td><input type="text" name="other9" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete19()"><input type="text" name="other19" value="" readonly><button value="use" onClick="u19()">Use</td></tr>
    <tr><td><input type="text" name="other10" value="" readonly>&nbsp;<input type="button" value="Delete &gt;" onClick="delete20()"><input type="text" name="other20" value="" readonly><button value="use" onClick="u20()">Use</td></tr>
    </form></table>
    </center>
    </td></tr>
    <tr><td>
    <form name="data1">
    <input type="text" name="txt1" readonly value="anonymous"> Your name<br>
    <input type="text" value="00" name="exp" readonly> Experience points<br>
    <input type="text" value="00" name="atk" readonly> Attacking points<br>
    <input type="text" value="00" name="def" readonly> Defensive points<br>
    <input type="text" value="00" name="hp" readonly> HealthPoints<br>
    </form>
    </td></tr>
    </table>

    <table align="right">
    <tr><td bgcolor="red"><a href="1.htm" target="B"><h1>HOME</h1></a></td></tr>
    </right>
    </body></html>

    and here are the bottom frames pages (Next message)

    Please hence that the first page is - ur3.htm' and the second page is 'ur4.htm'


    Any help is greatly apprecited.

  2. #2
    Join Date
    Jan 2004
    Location
    UK
    Posts
    248

    page 1

    <html><head><title>NEW RPG GAME</title>
    <script language="javascript">


    </script>
    <style>
    body,html {
    cursor:crosshair;
    scrollbar-base-color:lime;
    scrollbar-arrow-color:lime;
    scrollbar-track-color:lime;
    scrollbar-face-color:lime;
    scrollbar-3dlight:lime;
    scrollbar=3ddark-color:lime;
    }
    a {color:red; font-family:impact; font-size:32pt; text-decoration:none}
    a:hover {color:blue}
    </style>
    </head>
    <body bgcolor="lime">
    <script language="javascript">
    </script><center><table><tr><td>
    <img src="ur3.gif" usemap="#home1" border=0></td><td><form name="dir"><input type="text" name="direction" value=""></form></td></tR>
    <map name="home1">
    <area shape="square" coords="0,164, 142,208" onClick="window.location='bat1.htm'" onMouseover="document.dir.direction.value='up-road'" onMouseout="document.dir.direction.value=''">
    <area shape="square" coords="142,209, 0,282" onClick="window.location='ur4.htm'" onMouseover="document.dir.direction.value='up-road'" onMouseout="document.dir.direction.value=''">
    <area shape="square" coords="0,283, 151,351" onClick="window.location='ur4.htm'" onMouseover="document.dir.direction.value='up-road'" onMouseout="document.dir.direction.value=''">
    <area shape="square" coords="152,352, 0,383" onClick="window.location='ur4.htm'" onMouseover="document.dir.direction.value='up-road'" onMouseout="document.dir.direction.value=''">
    <area shape="square" coords="477,392, 634,155" onClick="window.location='ur2.htm'" onMouseover="document.dir.direction.value='down-road'" onMouseout="document.dir.direction.value=''">
    </map></table><p><a href="ur2.htm">BACK</a>
    </body></html>(ur3.htm)

  3. #3
    Join Date
    Nov 2002
    Location
    Nashua, NH
    Posts
    3,195

    Re: Whats wrong?

    Originally posted by chriz
    Hi again!

    One my site, i have two frames. <snip>
    That is the root of your problems.
    Vladdy

    Working web site is not the one that looks the same in a few graphical browsers, but the one that adequately delivers its content to any device accessing it.

  4. #4
    Join Date
    Jan 2004
    Location
    UK
    Posts
    248

    page2

    <html><head><title>NEW RPG GAME</title>
    <script language="javascript">


    </script>
    <style>
    body,html {
    cursor:crosshair;
    scrollbar-base-color:lime;
    scrollbar-arrow-color:lime;
    scrollbar-track-color:lime;
    scrollbar-face-color:lime;
    scrollbar-3dlight:lime;
    scrollbar=3ddark-color:lime;
    }
    a {color:red; font-family:impact; font-size:32pt; text-decoration:none}
    a:hover {color:blue}
    </style>
    </head>
    <body bgcolor="lime">
    <script language="javascript">
    </script><center><table><tr><td>
    <img src="ur4.gif" usemap="#home1" border=0></td><td><form name="dir"><input type="text" name="direction" value=""></form></td></tR>
    <map name="home1">
    <area shape="square" coords="0,213, 134,158" onClick="window.location='bat2.htm'" onMouseover="document.dir.direction.value='up-road'" onMouseout="document.dir.direction.value=''">
    <area shape="square" coords="138,214, 0,263" onClick="window.location='ur5.htm'" onMouseover="document.dir.direction.value='up-road'" onMouseout="document.dir.direction.value=''">
    <area shape="square" coords="0,264, 129, 327" onClick="window.location='bat2.htm'" onMouseover="document.dir.direction.value='up-road'" onMouseout="document.dir.direction.value=''">
    <area shape="square" coords="129,328, 0,384" onClick="window.location='bat2.htm'" onMouseover="document.dir.direction.value='up-road'" onMouseout="document.dir.direction.value=''">
    <area shape="square" coords="633,153, 444, 393" onClick="window.location='ur3.htm'" onMouseover="document.dir.direction.value='down-road'" onMouseout="document.dir.direction.value=''">
    <area shape="poly" coords="248,73, 282,52, 397,53, 395,88, 280,90, 248,73" onClick="alert("Next city - 1.5 miles")" onMouseover="document.dir.direction.value='road sign'" onMouseout="document.dir.direction.value=''">
    </map></table><p><a href="ur3.htm">BACK</a>
    </body></html>

    (ur4.htm)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles