|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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> |
|
#2
|
||||
|
||||
|
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! |
|
#3
|
|||
|
|||
|
Quote:
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. |
|
#4
|
||||
|
||||
|
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.
|
|
#5
|
|||
|
|||
|
Quote:
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... |
|
#6
|
||||
|
||||
|
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);"> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Getting problem in Browser while upload a Image? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|