|
I am developing a Web based Image Viewer, using InterDev with JavaScript.
I am initialising a listbox (dropdown) with the names/locations of the batches of images and prompt the User to select one. I am not using a Form, but have a script that, on the press of a "Show Images" button, gets the value from the listbox and then uses "window.open()". No problem there.
But, how can I pass the name of the batch to the new window so that it can display its images?
If I am reading it write, "window.open()" takes:
1. the window to open e.g. MyImageWindow.asp
2. the name of the window e.g."My Window" and
3. it's attributes (size, position, resizable etc)
I tried passing it in as the name, then dereferrencing that, but it will only accept a string literal.
I think I'm probably missing something really obvious here, you know how it is!
Really grateful for any help...thanks.
code dope.
|
|
|
|
|
Try something like this:
window.open('MyImageWindow.asp?MyBatch=' + varMyBatch, .......)
|
|
|
|
|
Yes, thanks Konstantin...it opens the Window OK now, but how do I get at the value that I've passed in?
I really appreciate your help..I'm very new to InterDev and ASP, as you can probably tell!
code dope.
|
|
|
|
|
In your ASP page (server side) you can "catch" your parameters like this:
<%
myBatch = Request.QueryString("MyBatch")
%>
|
|
|
|
|
Thanks a lot for your kind help Konstantin.
It works fine now. I think that before I go any further with this project I need to spend some time studying ASP a bit more. My inexperience is causing me problems that shows my lack of basic understanding.
Hopefully I shouldn't have to ask too many more questions now!
Thanks again.
code dope.
|
|
|
|
|
code dope wrote:
Thanks a lot for your kind help
No problem. It's all a part of our "lure C++ people into web development" program.
|
|
|
|
|
Hi,
Please help me out in using the TabStrip Control in .NET Beta 2.
The Application should have a CodeBehind.
With Warm Regards,
Prabhu Kumar.M
__//\\__
|
|
|
|
|
As the documenation states when you use the innerHTML property of an element any HTML tags within are parsed and formatted.
However IE does a very poor job of parsing and formatting the tags (rips of quotes, turns XHTML into bog-standard HTML etc. etc.) and I would like to know if anyone knows either how to stop IE from parsing and formatting when I use the innerHTML property, or is there another way to get the contents of a DIV?
thanks.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
|
|
|
|
|
Did you try to just use innerText instead of innerHTML property?
|
|
|
|
|
Konstantin Vasserman wrote:
Did you try to just use innerText instead of innerHTML property?
I am using both. innerText works fine, but innerHTML parses and re-formats any HTML tags in the data.
Basically I have a DIV and a TEXTAREA. The page first loads with the CONTENTEDITABLE attribute set to true on the DIV and the page content displayed. The user may then edit the content.
They can also click a button which hides the DIV and makes the TEXTAREA visible. The TEXTAREA is then filled with the innerHTML value of the DIV. This way the person can edit the actual HTML of the DIV.
But unfortuanatley as soon as I pull the innerHTML property any HTML tags in it get formatted and parsed. I need to stop that.
(I think we need a "Paul Watson's Crazy Questions" corner, and you can be the star Answer Giver )
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
|
|
|
|
|
Is this what you are doing: test page?
Sorry, I am kind of slow these days...
Paul Watson wrote:
I think we need a "Paul Watson's Crazy Questions" corner
There you go - new forum idea for Chris...
Paul Watson wrote:
you can be the star Answer Giver
I usually have more questions about your questions then real answers, so I'll be the star "confuser of issues even more" kind of guy.
|
|
|
|
|
Did you ever figure this one out?
|
|
|
|
|
Konstantin Vasserman wrote:
Did you ever figure this one out?
Not yet Konstantin, and it is really annoying*
However I am giving MS a support call tomorrow on the subject, will report back on the results.
* Not only does it trash well formed XHTML, it also turns virtual links into physical ones (e.g. "/resources/resource.asp" becomes "http://www.blah.com/resources/resource.asp") which is really bad news when a site is on a test server and not on the official URL yet!
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
|
|
|
|
|
Oh shite are you serious...?
IE does that...?
A while back I read an article on xhtml (yours i think) and decided to re-write all my old pages and code in xhtml.
There is lots of dynamic DHTML floaties the whole bunch, but I wasn't aware of this IE problem...
Be sure to let me know if you find the answer.
Thanx
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I'm playing with a new project, the goal of which is to test our customers' attitudes and acceptance of e-commerce before investing in it whole hog. The concept is to provide two pieces that work together. One is a website where a contractor (as in nail pounder, not techie) can enter descriptions and quantities of material. This site would take each RFQ and send it as an email to a private mailbox. The second part is a client running on a PC in our Contractor Sales department. That piece would periodically check the mail and, when new RFQs are available, would print them to a local printer. The rest would be handled by the sales staff.
My question for the experts is more of a series of questions. Should I use ASP for the website end of it, or stick with simple HTML? On the client side, is there any benefit to trying to figure out MAPI in C++, or should I simply steal and modify an email client I found in a VB book? If this should prove worthwhile, the company will probably want me to produce something a lot more elaborate and flexible in zero time (SOP here) so it might be better to spend the time to really learn the best possible techniques rather than just churning out something that will work for this one test. I should point out that my C++ skills are minimal, and my time for learning more is limited - this project is on my time.
Thanks for any guidance!
|
|
|
|
|
I think email would be a rather obfuscated way to go. It would be best I think to use a database that the ASP would write to, and have the client program read from that. It doesnt have to read from the database directly, but rather could just read from a "back-door" ASP page.
This has the added benefit of keeping most of the logic in one spot, the ASP code. For example, if you decide that you want to implement logging of a certain type of RFQs, rather than distribute new clients that write log files, you could just have the "back-door" ASP do the logging.
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
That's a great idea! I thought the email idea was a bit iffy, but given what I know how to do, it seemed the easiest. The database approach makes more sense, and it would be easier to expand upon if the concept catches on. Thanks!
|
|
|
|
|
Roger Wright wrote:
Should I use ASP for the website
Yes. If you want to do some processing on the server side - use ASP. You will have simple HTML page for the form your contractors fill out and then simple ASP page that will process the results of the form submission.
Roger Wright wrote:
On the client side, is there any benefit to trying to figure out MAPI in C++
No. MAPI sucks with C++ or without it. If you want to send emails - use some free SMTP ActiveX DLL (like Dundas Mailer).
In your particular case I would have to agree with David: it is better to store info in a simple Access database and have client check that as oppose to scanning someone's mailboxes for new messages using MAPI( ).
You could probably get by without a client app all together: When contractor submits the form your ASP page
1. Will store information in database.
2. Will send a notification email to sales (using SMTP DLL).
3. Will print a report using some simple ActiveX DLL that you will write in VB or C++. I recommend VB for the speed of development.
I hope this helps.
|
|
|
|
|
It does indeed help! Thanks, Konstantin! I noticed that MAPI support in C++ was much nastier than using the simple controls provided in VB, but I was waffling on the choice because I see so much C++ emphasis here. There must be some reason that so many people prefer it, though I can't see any advantage when speed of execution is not an issue. The database approach you and David recommend will take a bit of work, as I don't know what our website host allows, but it does seem to be the smartest way to attack the problem.
|
|
|
|
|
Roger Wright wrote:
I see so much C++ emphasis here. There must be some reason that so many people prefer it, though I can't see any advantage when speed of execution is not an issue.
"C++ vs. VB" issue is a lot like "Linux vs. Windows" - religious zealotry. So I try not to pay any attention to them and I use whatever tool I see appropriate for the work at hand.
|
|
|
|
|
Point well taken... and a good attitude to emulate!
|
|
|
|
|
Hello there -- I have spend the last couple of weeks learning ASP and getting a lot of stuff to work. Now that I am done, I am curious how much MS Access helps with this whole process. While I created all my code myself, I have a suspicion that Data Access Pages could have made my life easier. At least given me a head start.
Can you, for example, export a form to an ASP page from Access 2002?
any info would be great,
Tim
---------------------------------------
Tim Booher
|
|
|
|
|
Access gives you a very simple kind of back end database. It's not a form editor by any means.
Nish
I am looking for a free racing game. Old style racing game without any complicated 3D stuff. Around 4 MB download. If anyone has such a game, please inform me.
|
|
|
|
|
yes -- but will it generate asp?
tim
|
|
|
|
|
Nope, you will get only a data and need to generate HTML by yourself
In general: ASP + Access = HTML
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|