You need to be logged in to post in the forums. If you do not have an account, please sign up first.
What am I doing wrong?
I was wondering if someone could tell me why I am not getting my desired result from this script.I'm using:
<script language="JavaScript" src="http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3133&action=js">
</script>
<script language = "JavaScript">
document.write("<h1>" + Title + " Entries Page</h1>");
document.write('<hr />');
for (nextE = 0; nextE < FilledEntries; nextE++) {
document.write('Username: ' + GuestName[nextE] + '
');
document.write('This Posts Unique ID, set by "GuestDate[nextE]": ' + GuestDate[nextE] + '
');
document.write('Post Date: ' + GuestDate[nextE] + '
');
document.write('Message:' + GuestMessage[nextE] + '
');
aR_BgColor="";
aR_FgColor="";
aR_url=location.href + "?=" + GuestDate[nextE];
aR_title=document.title + "";
aR_StarType ='1';
document.write('<div id="aR_star_info" class="aR_star_info">This text is in the ar_star_info div, so I know this div is repeating itself properly, well almost.</div>');
document.write('<scr'+'ipt type="text/JavaScript" src="http://addratings.com/aR_BootStrap.js"></scr'+'ipt>');
document.write('<hr />');
}
</script>
And an example of this is here: http://www.mobilestimulus.com/tests/book3/entries
It is a combination of a guestbook:
<script language="JavaScript" src="http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3133&action=js">
<script language = "JavaScript">
document.write("<h1>" + Title + " Entries Page</h1>");
document.write('<hr />');
for (nextE = 0; nextE < FilledEntries; nextE++) {
document.write('Username: ' + GuestName[nextE] + '
');
document.write('This Posts Unique ID, set by "GuestDate[nextE]": ' + GuestDate[nextE] + '
');
document.write('Post Date: ' + GuestDate[nextE] + '
');
document.write('Message:' + GuestMessage[nextE] + '
');
document.write('<hr />');
}
</script>
and a star rating tool:
<script type='text/javascript'>
aR_BgColor="";
aR_FgColor="";
aR_url=location.href;
aR_title=document.title;
aR_StarType ='1';
document.write('<div id="aR_star_info" style="height:60px;"></div>');
document.write('<scr'+'ipt type="text/JavaScript" src="http://addratings.com/aR_BootStrap.js"></scr'+'ipt>');
</script>
but the star rating tool won't repeat under each post. Can someone help me fix it?
By the way, the only way I can edit http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3133&action=js
is using the form at:
http://www.mobilestimulus.com/tests/book3/index
and I cannot edit:
http://addratings.com/aR_BootStrap.js
at all.
I only have the code posted here to work with.
Big thankyou to anyone who may try to help me...
Originally posted by Lex1:
«document.write don't work without document.close() - DSK-291013 at bugs.opera.com» ?
Thanks, but that doesn't seem to solve the problem. Did you try it?
5. June 2010, 19:49:29 (edited)
Nope
After trying, I see:
http://validator.w3.org/check?uri=http://www.mobilestimulus.com/tests/book3/entries;verbose=1
42 Errors, 11 warning(s)
Update
Don't work «src="http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3133&action=js"».
If you to add a code in the page, everything is correct:
2010-06-06 02 48 52.png
After trying, I see:Uncaught exception: ReferenceError: Undefined variable: Title
Error thrown at line 2, column 1 in http://www.mobilestimulus.com/tests/book3/entries:
document.write("<h1>" + Title + " Entries Page</h1>");
http://validator.w3.org/check?uri=http://www.mobilestimulus.com/tests/book3/entries;verbose=1
42 Errors, 11 warning(s)
Update
Don't work «src="http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3133&action=js"».
If you to add a code in the page, everything is correct:
2010-06-06 02 48 52.png
5. June 2010, 20:17:02 (edited)
Originally posted by Lex1:
If you to add a code in the page, everything is correct
What do you mean? Without
http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3133&action=js
my guestbook won't update when someone make a new entry, right?
By the way, I did try the code you provided in the screenshot, but it had same result, only one rating tool.