1) AmritGroup: Members Posts: 9Joined: 18 Dec 2007Location: SwedenIP: 90.224.--.--
Posted:
Hi Angus.
I downloaded the updated script and uploaded it to my server and added it to my index.php file. However it seems you've changed something.
When clicking on a link it is now like any regular link, and I'm just wondering what the new syntax is for the script to work.
I have a divtag called <div id="targetScroll"></div> and the link is <a class="loadinto-targetScroll" href="somefile.php">Somefile</a> And that worked before, but now it doesn't.
I tried reading the syntax, but seems I'm a bit lost. :-)
Have a nice weekend.
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 203.109.--.--
Posted:
Does the demo work? In which browser is this? And do you have a link to your example so far?
- Angus.
3) AmritGroup: Members Posts: 9Joined: 18 Dec 2007Location: SwedenIP: 90.224.--.--
Posted:
I had to change around a bit due to the nature of the files I need to use.
So I had to make my menu a .js file, and it works great except for the fact that httprequest no longer works, neither version. Only tried in IE7 though, but it wants to open the file when clicking on a link and that's not quite what I want. ;)
Is it possible to have a .js file instead of html or php?
// Amrit
4) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 118.92.--.--
Posted:
You might have a JS error somewhere breaking the scripts?
I don't quite get what you mean regarding .JS files and the "nature of the files [you] want to use". You must load plain HTML content with this script. If you want to load a .JS file just create a <script> element and append it to the document, you don't need this script.
- Angus.
5) AmritGroup: Members Posts: 9Joined: 18 Dec 2007Location: SwedenIP: 90.224.--.--
Posted:
Well. I have a menu, with 4 different styles to it. To change them I used to call them up with this script of yours and it worked like a charm.
Now I had to remake the whole look on my site, disabling me the use of calling in a regular html file. So my question is, can a javascript be called in the same way as with the plain html files or am I bad out of luck?
Thanks for your answer.
(Dunno why, but I'm getting more and more stupid and ooh what a relief, I guess)
6) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 118.92.--.--
Posted:
Why not use a CSS switcher script to change the look of your menu and keep the same HTML/JS? That's the obvious solution that strikes me.
Otherwise, you can call HTML to insert into the current page with this script but not .JS files. To insert a script file you must create a new <script> element and append it to the document, but I don't think this would be a good idea for changing a menu unless you have a very good understanding of how the DOM works and scripts persist in it!
- Angus.
7) AmritGroup: Members Posts: 9Joined: 18 Dec 2007Location: SwedenIP: 90.224.--.--
Posted:
Well what strikes me at times is how blind I seem to be for obvious solutions. ;)
Actually used this script for another function and as it worked great I thought I'd give it a try with my menu and since it worked great there to I sort of just stopped thinking too much of it anylonger. :-)
Thanks for pointing my in a better direction again. :D
I will however probably get back to you on the updated version of this script since it seems something has changed in the new version.