Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 JS Guru's
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 17 January 2004 :  19:08:44  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
I am trying to figure out this JS problem I am having. I have a button that I click and it pop ups a window I can select an image from and it inserts the image into a text box. I am trying to get another form to do the same thing but just do not understand JS at all. Can someone look at this text file for the popup and see if they know what makes it insert the image?

http://www.eznetideas.com/insert_image.txt

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 18 January 2004 :  05:07:45  Show Profile  Visit HuwR's Homepage
probably the swapimage function
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 18 January 2004 :  16:07:57  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
I will try that and see if i can get it to work

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 19 January 2004 :  00:22:21  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
Well I could not understand any of the JS of the swampimage function but here is the code to me where it looks like the insert happens. The code in the red is it actually getting the value of the field where it inserts into the variable.


  elmImage.src = txtFileName.value;
  
  if (txtHorizontal.value != "") { elmImage.hspace = parseInt(txtHorizontal.value); }
  else                           { elmImage.hspace = 0; }

  if (txtVertical.value != "") { elmImage.vspace = parseInt(txtVertical.value); }
  else                         { elmImage.vspace = 0; }
  
  elmImage.alt = txtAltText.value;

  if (txtBorder.value != "") { elmImage.border = parseInt(txtBorder.value); }
  else                       { elmImage.border = 0; }

  elmImage.align = selAlignment.value;
  grngMaster.collapse(false);
  grngMaster.select();
  window.close();

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 19 January 2004 :  01:26:53  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
Ok I found that this is the line that seems like it does the insert....

grngMaster.execCommand("InsertImage", false, idstr);

I add JS alert before and after it so I know this is the line that does it, but cant find out anything else on how to specify the image.

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07