The bit of JS in question is as follows;
else if (screen.width <= 800) {
document.location = "swap.html?+res+800";
Anybody know how can I persuade Miva to grab the 'screen.width'
variable and write it to a file?
If your problem is only to store the values here is a cool and simple way to
do it (without making redirection):
<script type="text/javascript" language="JavaScript">
var width=screen.width;
var height= screen.height;
var
url="http://your-domain-name.com/mivascript.mvc?width="+width+"&height="+hei
ght;
document.write('<scr' + 'ipt src="' +url+ '&var2=1"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
</SCRIPT>
Just put this script to the end of your file and create a file (in our case
mivascript.mvc), which will grab the "width" and "height" values. Of course,
don't generate any response in that file, else you will have a JavaScript
error.
A better way to do that is to use AJAX (HTTP REQUEST) but it's more
complicated.. Anyway if you need an AJAX example and I'll post it :P
Best regards,
Claudiu Bischoff
> -----Message d'origine-----
> De : miva-...@googlegroups.com [mailto:miva-...@googlegroups.com] De
> la part de Gudgee
> Envoyé : mercredi 26 avril 2006 16:34
> À : miva-script
> Objet : [miva] Collecting JS generated values
Very cool....
Best
rg
Ralph Gauer
Interim Executive Director, SIGRED
ralph...@zianet.com
505-590-7739 cell
www.silvercitybusiness.com
www.grantcountybusiness.com
I would appreciate a look at the Ajax thingie.
John Tuach