htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0 - Add-Ons:
"Keep" value from htmlArea in popup-window


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


eisa
User

Mar 20, 2003, 8:34 AM

Post #1 of 11 (11133 views)
Shortcut
"Keep" value from htmlArea in popup-window Can't Post

Not sure how to explain this, but I will try.

Background:
The insert image functions I have seen will not suit my needs because I have of lot's of images, therefore I have stored all image-information in a database. This means that I can search for images and store much information about them. I'm developing in ASP.

Problem:
I have made I pop-up window where all image (information) are listed (imagelist.asp)with paging possibility)). When I choose one of the images I wan't to insert into the htmlArea I direct to a new page (image_choose.asp). The pop-up window are using this script from the htmlarea.js file:


case "insertimage":
if (HTMLArea.is_ie) {
window.open(this.popupURL("imagelist.asp"), "insertimage",
"toolbar=no,menubar=no,personalbar=no,width=640,height=480," +
"scrollbars=yes,resizable=yes");
}
HTMLArea._object = this;


Question:
Is it possible to make image_choose.asp "remember" the htmlArea-values, I'm not sure which values and how to grab those values because I'm not the best coder in javascript. I wan't image_choose.asp to work as the insert_image.html page, but I'm not sure if this is possible because I go via another page first.

EiSa

http://www.savio.no/htmlarea/example.asp | Webdesign


Luis
Veteran

Mar 20, 2003, 7:51 PM

Post #2 of 11 (11115 views)
Shortcut
Re: [eisa] "Keep" value from htmlArea in popup-window [In reply to] Can't Post

What about an inner frame, instead of navigating inside the popup?


Don't give up!!
http://webstationone.com/test/htmlarea


eisa
User

Mar 27, 2003, 10:58 AM

Post #3 of 11 (11059 views)
Shortcut
Re: [Luis] "Keep" value from htmlArea in popup-window [In reply to] Can't Post


In Reply To
What about an inner frame, instead of navigating inside the popup?



I was thinking of that, but had some problems with the grabbing the values.

Got it working now, isn't finished yet but I'm close. Paging and possiblity to search for images. I have rebuilt Randy_23's solution (MOD: Browse Image Dialog (.ASP)). Thanx to him.

Since I'm not so good at this, is it possible to use "Jump menu" inside the "Dialogbox for Webpage"? Now the jump menu opens in a new window, out of the iframe.

http://www.savio.no/htmlarea/example.asp | Webdesign


Randy_23
User

Mar 27, 2003, 12:49 PM

Post #4 of 11 (11054 views)
Shortcut
Re: [eisa] "Keep" value from htmlArea in popup-window [In reply to] Can't Post

Hello Eisa,

Nice to know that you found some use of my version. Please share the source of your version if possible. I am real interested on having a look on it. Any live link perhaps?Crazy

Best regards // Pat!


eisa
User

Mar 27, 2003, 1:12 PM

Post #5 of 11 (11051 views)
Shortcut
Re: [Randy_23] "Keep" value from htmlArea in popup-window [In reply to] Can't Post

I will do that as soon as it's working good enough. Have to warn you, the code is a little bit messy in the ASP-file that list's the images since I'm a hobby-coder and only do this spare time. I have used MX to make the paging and the recordset. I have skipped the upload-function for the moment because I have made another version for that. It's also made with pure ASP-upload, and to be sure I don't replaces any other images I rename the start of the imagename with an autonumber ID taken from my Access DB. All images goes to the same directory.

I'll be back as soon as the function is worth sharing.

http://www.savio.no/htmlarea/example.asp | Webdesign


Randy_23
User

Mar 27, 2003, 1:22 PM

Post #6 of 11 (11050 views)
Shortcut
Re: [eisa] "Keep" value from htmlArea in popup-window [In reply to] Can't Post

Hi Eisa,

No problem I am used to messy code (e.g my own) Blush. Looking forward to have a peek at your solution (or parts of it).

Best regards // Pat!


eisa
User

Mar 27, 2003, 2:22 PM

Post #7 of 11 (11047 views)
Shortcut
Re: [Randy_23] "Keep" value from htmlArea in popup-window [In reply to] Can't Post

Randy_23, in your browseimage.asp file you have used some code similiar to this (it's not exactly like yours):


strName = "/" & (Replace(rsImages("FileURL"),"\","/"))
txtAltText = rsImages("FileHeading")

Response.Write "<a href=""javascript:"" onClick=""top.document.forms[0].elements['ImgUrl'].value='" & strName &"';top.document.PREVIEWPIC.src='" & strName &"';"">" & strName & "</a>"


My problem now is that I'm wondering how automatically fill inn the ALT-text in the txtAltText field in the insert_image.html file. I have tried to do it like this:

Response.Write "<a href=""javascript:"" onClick=""top.document.forms[0].elements['ImgUrl'].value='" & strName &"';top.document.PREVIEWPIC.src='" & strName &"';top.document.forms[0].elements['txtAltText].value='" & txtAltText &"';"">" & strName & "</a>"

but I'm missing something in the insert_image.html file so it won't work. Any suggestion?

EiSa

http://www.savio.no/htmlarea/example.asp | Webdesign


eisa
User

Mar 27, 2003, 5:10 PM

Post #8 of 11 (11041 views)
Shortcut
Re: [Randy_23] "Keep" value from htmlArea in popup-window [In reply to] Can't Post

This is my version so far:

http://www.savio.no/htmlarea/example.asp

Some text is in norwegian.

Still struggeling with the ALT-problem (See my other post).

http://www.savio.no/htmlarea/example.asp | Webdesign


Randy_23
User

Mar 28, 2003, 9:06 AM

Post #9 of 11 (11018 views)
Shortcut
Re: [eisa] "Keep" value from htmlArea in popup-window [In reply to] Can't Post

Hello EiSa,

I understand your problem sort of. I had the same trouble filling in the txtFileName. And I didnt manage to fix that the way I wanted. So in my source I have kept the txtFileName hidden, which makes it possible use that in the background enabling the rest of the script to work. And in the end I replace the actual URL with the command elmImage.src = document.PREVIEWPIC.src, maybe you can do something similar. Please compare the original 2.03 source with my and you'll see the small changes.

My actual problem was that I couldnt pass the values directly from the browsescript into the txtFileName without using a form in between, and I couldnt get the input type txtFileName to work within a form, thus leaving me with two fields (one outside and one inside the form). Since I am no javascript pro I couldnt get it to work any other way. Now, it does work, without causing trouble to the user so i am satisfied with that.

I had a look on your version and it seems to work nicely Smile.

Best regards // Pat!

(This post was edited by Randy_23 on Mar 28, 2003, 9:07 AM)


eisa
User

Mar 28, 2003, 6:02 PM

Post #10 of 11 (10999 views)
Shortcut
Re: [Randy_23] "Keep" value from htmlArea in popup-window [In reply to] Can't Post

Thank's for your advice Pat, has helped me a lot. Got grey hair when I was fighting with the Javascripts and some replace problem, but I think it's working now.

Pure ASP-upload is also added. (Upload's a file and inserts the information into a Access Database.)

I will release the source on the demopage if somebody is interested. Have to make the code more general, right know it's just made to suit my needs.

Demo is here:
http://www.savio.no/htmlarea/example.asp

EiSa

http://www.savio.no/htmlarea/example.asp | Webdesign


(This post was edited by eisa on Mar 30, 2003, 9:33 AM)


Randy_23
User

Mar 30, 2003, 11:52 AM

Post #11 of 11 (10973 views)
Shortcut
Re: [eisa] "Keep" value from htmlArea in popup-window [In reply to] Can't Post

Hi again EiSa,

I had a look on your solution again and it seems to work well indeed. Glad that I could help you a bit.

Best regards // Pat!

Ps. Thanx for the credits on your demo page Wink

 
 
 


Search for (options)