Newsgroup: it.comp.lang.javascript
Titolo: Problems with parameters between 2 html documents HELP!!!

  Hi all! I'm trying to do something that should be  easy, but it's getting
me crazy
   I just have a main page called "index.htm" with a link that looks like
this:
  <a href="index2.htm?artistas&artistas"><img name="caphall" border="0"
src="images/cap.gif" width="77" height="75"></a>
  So it's supposed to open in the same window another html page called
"index2.htm", which is composed by
2 frames. In the top frame, I will always load another page called
"cabecera.htm", while in the "MainFrame"
I want to load the page which name I send as a parameter in the link above,
where first "artistas" should be the
folder where the second "artistas" is (the page I want to load in the
frame). index2.htm code looks like this:
<html><head><title>Untitled Document</title>
<script language="JavaScript">
<!--
  var parametros=location.search.split("&");
  var pathdestino=parametros[0];
  var destino=parametros[1];
file://-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset rows="98,297*" frameborder="NO" border="0" framespacing="0"
cols="*">
  <frame name="FrameCabecera" scrolling="NO" noresize src="cabecera.htm"
frameborder="NO">
  <script>
  <!--
   document.write("<frame name='MainFrame' src=" +
                   vpathdestino + "/" + vdestino +
                   ".htm" + " frameborder='NO'>");
    file://-->
  </script>
</frameset>
<noframes><body bgcolor="#FFFFFF"></body></noframes>
</html>
  Well, no way. I don't know what's wrong in all this mess ;( Can anybody
help me?
Thanks a lot in advance.

   </script>
Why you placed the letter "v" before the variables name?
I think that this should work:
    document.write("<frame name='MainFrame' src=" +
                    pathdestino + "/" + destino +
                    ".htm" + " frameborder='NO'>");
If not try placing (just for fun) a "/" after src:
 ..... src=/" + ....
And try using Netscape for your tests.
IE doesn't read the querystring when working off-line. To read them you have to 
use the PersonalWebServer.
Hoping this hel, MC&HNYear
-- 
Ciao, Riccardo
------------------------------------------------------------------------
WebMaster: ----> 
http://www.jsdir.com
 <---- (aka 
http://www.jspoint.it
)
------------------------------------------------------------------------
               Nessun traguardo è abbastanza lontano.
------------------------------------------------------------------------

 help me?
You can't write only one frame; you can write all frameset or change
location after the page is loaded.
Try this:
----------------------------
<script language="JavaScript">
<!--
 var pippo=location.search.substr(1);
  var parametros=pippo.split("&");
  var pathdestino=parametros[0];
  var destino=parametros[1];
  alert(pathdestino+' '+destino)
  function cambia(){
  MainFrame.location=pathdestino + "/" + destino +".htm"
  }
// -->
</script>
</head>
<frameset rows="98,297*" frameborder="NO" border="0" framespacing="0"
cols="*" onLoad="cambia()">
  <frame name="FrameCabecera" scrolling="NO" noresize src="prova001.htm"
frameborder="NO">
<frame name='MainFrame' src="" frameborder='NO'>");
</frameset>
<noframes><body bgcolor="#FFFFFF"></body></noframes>
</html>
-------------
Saluti, Paolo