codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Passing Variable To js File  jimbois at 15:23 on Friday, February 02, 2007
 

The following works (js file):

var _myimage = "/forum/img002.gif"
if (screen.width>=1280 && screen.width<=1399) {document.write('<IMG style="border-style: groove; border-color: #999999; border-width: 15" SRC=' + _myimage + ' usemap="#Objmap" width="870" height="640">')}

But I want to pick up the img002.gif from the htm file

I tried this but it did not work when I substituted myimage for _myimage in the js file:

<script type="text/javascript" src="/forum/screensize_myimage_img002.gif.js"></script>









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  close window
•  Passing Variable To js File
•  Re: Compiling JAVA code in .NET?
•  managed nd unmanaged code..
•  Looking for free form submit php script?
•  horizontal scroll of images
•  Re: DHTML : popup slider using image
•  Re: Java question - zoom/selection
•  Re: Login Box for a tab


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007