ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 10th, 2008, 06:19 AM
akmal.ijaz akmal.ijaz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Sunderland
Posts: 38 akmal.ijaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 43 m 31 sec
Reputation Power: 2
Getting problem in Browser while upload a Image?

I have got a bit problem in opening a popup window for upload an image. When I click on brows button, my main window also reset (before remain same) as a popup window. So every time I need to click on the brows button and then click on the “stop” button on the browser to keep the main window same. I am attaching a code which I used before and it is still same.

Could anyone help me out from this problem?

Code:
 <a href="ProductImageUpload.cfm?type=2" title="Upload/Manage Images" onclick="showUpload(this); return false;"><img src="assets/images/folder.gif" width="16" height="16" border="0" /></a>

Reply With Quote
  #2  
Old March 10th, 2008, 07:43 AM
Ebot's Avatar
Ebot Ebot is offline
Meatball Surgeon
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Elbow deep in code
Posts: 1,040 Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)  Folding Points: 10015 Folding Title: Novice Folder
Time spent in forums: 1 Week 3 Days 3 h 37 m 17 sec
Reputation Power: 462
Is showUpload opening your popup? your <a> isn't and its what is making your main window change to a different page.
__________________
The liver is evil and must be punished!

Reply With Quote
  #3  
Old March 10th, 2008, 07:54 AM
akmal.ijaz akmal.ijaz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Sunderland
Posts: 38 akmal.ijaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 43 m 31 sec
Reputation Power: 2
Quote:
Originally Posted by Ebot
Is showUpload opening your popup? your <a> isn't and its what is making your main window change to a different page.


Yes, OnClick="Showupload(This)" open a Popup window. if i remove (This). then it won't show popup window and main window is change to new window.

But i want to show the popup window and stop changing the main window.

Reply With Quote
  #4  
Old March 10th, 2008, 02:47 PM
Ebot's Avatar
Ebot Ebot is offline
Meatball Surgeon
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Elbow deep in code
Posts: 1,040 Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)  Folding Points: 10015 Folding Title: Novice Folder
Time spent in forums: 1 Week 3 Days 3 h 37 m 17 sec
Reputation Power: 462
then don't put your function call in an <a>, thats why the main page is changing. The function is handling your popup, but then the <a> is changing your main window.

Reply With Quote
  #5  
Old March 11th, 2008, 07:06 AM
akmal.ijaz akmal.ijaz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Sunderland
Posts: 38 akmal.ijaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 43 m 31 sec
Reputation Power: 2
Quote:
Originally Posted by Ebot
then don't put your function call in an <a>, thats why the main page is changing. The function is handling your popup, but then the <a> is changing your main window.


I don't understand exectly. i am writing a function and as well calling code

Function is:-
Code:
function showUpload(obj) {
window.open(obj.href, "imageUploadWindow", "width=330,height=300,scrollbars=yes,resizable=yes");
}


and Photo Upload calling code
Code:
<td><cfparam name="FORM.ImageName_L" default="#rsGetLImage.Image_FileName#">
          <cfparam name="FORM.ImageName_T" default="#rsGetThumbnail.Image_FileName#">
          <cfset ImageSRC = Request.ImageLFolder & FORM.ImageName_L>
          <cfset ImagePath = Request.ExpandLFolder & FORM.ImageName_L>
          <input name="ImageName_L" type="text" tabindex="12" value="#FORM.ImageName_L#" size="25" onblur="updateImagePreview('2','#Request.ImageLFolder#'+this.value);">
          <input name="ImageName_T" type="hidden" tabindex="12" value="#FORM.ImageName_T#" size="25">
          <a href="ProductImageUpload.cfm?type=2" title="Upload/Manage Images" onclick="showUpload(this); return false;"><img src="images/folder.gif" width="16" height="16" border="0" /></a>
          <input name="ImageID_L" type="hidden" value="#rsGetLargeImage.prdctImage_ID#">
          <input name="ImageID_T" type="hidden" value="#rsGetThumbnail.prdctImage_ID#">
          <cfif FORM.ImageName_L EQ "">
            <img id="image2" src="" style="display:none;">
            <cfelse>
            <img id="image2" src="#ImageSRC#" alt="Image path: #ImageSRC#">


I hope that will be helpful to identify the problem...

Reply With Quote
  #6  
Old March 11th, 2008, 12:54 PM
Ebot's Avatar
Ebot Ebot is offline
Meatball Surgeon
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Elbow deep in code
Posts: 1,040 Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)  Folding Points: 10015 Folding Title: Novice Folder
Time spent in forums: 1 Week 3 Days 3 h 37 m 17 sec
Reputation Power: 462
Your <a> tag is what is sending your main window to a new one, your JS function is opening your popup, so when you click on your link, its sending your main window to a new page AND opening a popup window. If you want your main window to stay on the same page, try changing you link to this:

Code:
<img src="assets/images/folder.gif" width="16" height="16" border="0" onclick="showUpload(this);">

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Getting problem in Browser while upload a Image?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway