cedric
Jun 23 2009, 02:23 AM
Hi, I have a script in the body of my page that initialises the setting of an external script.
I was wondering if it was possible to change the inline script with an onclick and then reload the page
to make the new settings count?
kind regards;
Cedric
Brian Chandler
Jun 23 2009, 04:00 AM
Your question doesn't immediately make sense. It *really* helps if you show us what you are takling about, otherwise it's more or less impossible to help.
cedric
Jun 23 2009, 07:18 AM
<body>
<script type="text/javascript">
featuredcontentglider.init({
gliderid: "canadaprovinces", //ID of main glider container
contentclass: "glidecontent", //Shared CSS class name of each glider content
togglerid: "p-select", //ID of toggler container
remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
selected: 0, //Default selected content index (0=1st)
persiststate: false, //Remember last content shown within browser session (true/false)?
speed: 750, //Glide animation duration (in milliseconds)
direction: "rightleft", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
autorotate: false, //Auto rotate contents (true/false)?
autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
})
</script>
That is the start of my <body> but when I click on a link in the menu I would like the (selected: 0) to change to (selected:1).
Brian Chandler
Jun 23 2009, 08:50 AM
Well, programs don't work that way (by causing a bit of the program to change how it is written).
I'm not fluent in javascript, but I guess this is a call to an init() method, that sets all of those parameters (set of name: value pairs). What you need to do is call the function (method) that changes the properties of this featuredcontentglider object. To do that you need to be able to read and understand the documentation for the main script (wherever it is); or if there is no documentation, to reverse engineer, or give up and start again.
But anyway, it's not reasonable to expect someone else to just "know" how to do something like this. Have you tried asking for support from the script supplier?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.