 |
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4  | This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040 |
Please indicate which version of the book you are using when posting questions. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 22nd, 2003, 03:16 AM
|
|
Authorized User
|
|
Join Date: Sep 2003
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
'get by ID' javascript
Hi Imar [and anyone else who's willing/able to help!]. You kindly sorted out a glitch for me a few weeks back concerned updating templates properly with library items and dynamic data. I've used your excellent football project as the basis of a slight redevelopment of my employers' site. However, I've hit a weird one again.
The local version of the site performs perfectly - the side navigation contextual menu uses the 'get by ID' script and the current page shows up slightly larger and in white. However, this does not happen on the remote site, which I've uploaded to space at Brinkster http://genemedix.brinkster.net/index.html When I view the source of the page, it appears that the code is as you'd expect it to be, yet the script isn't working.
What have I done wrong, and what can I do to put it right?
Thanks for any help
Anne
:)
|
|

October 22nd, 2003, 04:56 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Anne,
I visited your site (looks nice, BTW) and opened the history page. I searched for the menu code and found this:
Code:
<script language="JavaScript" type="text/javascript">
var sPageName = '<%=Request.ServerVariables("SCRIPT_NAME")%>';
sPageName = sPageName.substr(sPageName.lastIndexOf('/') + 1 ).toLowerCase();
sPageName = sPageName.substr(0, sPageName.lastIndexOf('.'));
if (document.getElementById(sPageName))
{
document.getElementById(sPageName).style.fontWeight = 'Bold';
document.getElementById(sPageName).style.fontSize = '11pt';
document.getElementById(sPageName).style.color = '#ffffff';
}
</script>
This looks almost as it should, except for the line:
var sPageName = '<%=Request.ServerVariables("SCRIPT_NAME")%>';
As you can see, the ASP code is still in there. It's supposed to run at the server, and return the value of SCRIPT_NAME.
Either your server doesn't interpret the ASP code correctly, or when you uploaded your file, the <%= have been converted.
Can you run other ASP code just fine?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

October 22nd, 2003, 05:08 AM
|
|
Authorized User
|
|
Join Date: Sep 2003
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar
Thanks for your quick response, and for the nice comments! It is good to know that the javascript is OK. Weird about the ASP, though, but I'm sure you've identified the problem. I have another ASP problem, so think I need to contact Brinkster about it. My 'register' page is also not running properly, although on my local server it is fine, and a programmer friend has run it at his and has no problems. Currently, the response page of the form is bringing up the ASP code, would you believe, not the HTML page I want people to see!
So, I will contact Brinkster and ask what can be done. Many thanks for your help. If you are bored, though I doubt that could happen in your busy life, I have developed my version of your footie site a little further, though I've had to break off recently. it is done with tongue in cheek, and of course I'm not remotely biased in my commentary on the 'events' section http://www33.brinkster.com/anneward/ ;)
Cheers for now
Anne
|
|

October 22nd, 2003, 05:28 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Cool. It's looking great. I like what you have done to the club badges. Due to all kind of legal stuff, we didn't use club's logo's but this is how I imagined it to be. Nice!!
I also like the "typical wednesday supporter" ;)
I am glad that, although you're biased, you still left clubs from the Netherlands in.....
I think both of your ASP problems are related: in both cases the ASP is not run through the Web server, but sent to the client directly. It looks like the Web server does not have ASP enabled (.asp file mapped to the ASP engine)
Regards,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

October 22nd, 2003, 05:44 AM
|
|
Authorized User
|
|
Join Date: Sep 2003
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks, Imar! I hope Man U etc don't sue me, then, for being cheeky with their id ;)
Of course I left the Dutch teams in - how could I do otherwise? ;) - I even put Ruud's old club in as an extra! I admit I am ever so slightly biased, but that bias definitely includes RvN... I'm glad you liked the picture of my cat - she does look suitably hacked off, having to support Sheffield Wednesday, doesn't she?
Re the ASP issue, I have mailed Brinkster, and hope that it can be easily resolved. Many thanks for all your help and encouragement.
Tot ziens [is that how you spell it?]
Anne
|
|

October 22nd, 2003, 06:40 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yep, that's how you spell it.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |