473,799 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help in updating a aspImage in Repeater with JS

1 New Member
HI guys im fed up with this help me

The problem is..



Im having a repeater control in which im having a aspImage Control [asp:Image id="imgAImageUpload"]..just near to it is a href placed

Both are placed in a repeater Row as a RowContrl


When user clicks on href...a popup is opened up that shows a UI for Uploading the Image....when user clicks browse and saves the image...that image is reflected back in imgAImageUpload (the image contrl)..the idea is when user uploads the image file against the aspImage...im dynamicallly changing the src property of that control through a dynamically generated Javascript written on server side of that popup



The code is running fine in IE but mozilla is giving an error

The error is : "self.opener.par ent.forms[0].elements.ctl00 _ContentPlaceHo lder1_rptAnswer _ctl0 2_imgAImageUplo ad has no properties"



The code is as follows : -



When popup gets opened up user clickcs on browse button and selects file-> clicks upload

Protected Sub btnUpload_Click (ByVal sender As Object, ByVal e As System.EventArg s) Handles btnUpload.Click

Dim ss As String = "<Script language=JavaSc ript> "
ss += "try{"
ss += "self.parent.op ener.document.f orms[0].elements['" & imageControl & "'].src='" & Replace(path, "~/", "../../") & fName & fileExtension & "';"
ss += "self.close ();"
ss += "}catch(e){wind ow.alert(e.mess age);}"
ss += "</Script>"
If (Not Me.ClientScript .IsClientScript IncludeRegister ed("Startup")) Then
Me.ClientScript .RegisterStartu pScript(Me.GetT ype() , "Startup", ss)
End If

End Sub

After this the popup gets closed and the Parent window from where the popup was opened...in that the Repeater which is having that aspImage gets refreshed with the ImageUploaded

Morever i have placed that repeater in an Atlas:UpdatePan el

The code is running fine in IE but not working in Mozilla
Jan 24 '08 #1
1 1206
kenobewan
4,871 Recognized Expert Specialist
You need to detect browser and may need to take separate actions on each. HTH.
Jan 24 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2713
by: Tommy | last post by:
I have been working on getting nested repeaters to work for several days. When I add a repeater inside my item template i cannot see it in my code and can't set the datasource for it, etc, thus it's useless. Anytime i try to reference rptChild I get an error saying that it's not an object. If I set a break point I see that it's <nothing>. Here is a sample of code that shows the problem. I would REALLY appreciate any help on getting...
2
2064
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP (non-.Net) if I wanted to fill a list it may look something like this: -------START CODE <%
1
2139
by: mrwoopey | last post by:
I have a repeater control in a asp.net app. Once the repeater is fill with data (via bind) I would like to go through the repeater and change the color of one of the items. I can get to where the item is by looping through and seeing the contents of the DataBoundLiteralControl. I tried updating the DataBoundLiteralControl by adding <font> tags to change the color but objCurrentRepeaterItem.Controls(0) is read only. So, how do you update...
2
1792
by: News | last post by:
Hi I need help to display and edit data in a data grid within a repeater. The code is below: Sub dgrdEvents_EditCommand(sender As Object, e As DataGridCommandEventArgs) dgrdEvents.EditItemIndex = e.Item.ItemIndex BuildList() End Sub
2
5523
by: Ceema M via DotNetMonster.com | last post by:
Hello all, I have a nested repeater, which displays categories(parent repeater) and corresponding subcategories(child repeater). Both repeaters have checkboxes. When I check category checkbox and subcategory check boxes and click on submit button , I have to retrieve the corresponding categoryid and subcategory id, so that I can store it to a table. I am getting the categoryid but I am failing to get subcategoryid(actually I don't know...
2
1917
by: GD | last post by:
I'd like to use a Repeater to display data coming back from a cross-tab report. Because it's a cross-tab, I generally don't know how many columns are coming back. They do follow a certain format: e.g. CompanyName, c1, c2, c3, etc .. The current format of my repeater is: <table> <asp:Repeater ID="rptCompanies" Runat="server">
2
1316
by: champ.supernova | last post by:
I have a repeater, which contains in its <HEADERTEMPLATEa drop-down list (set to autopostback). If the page is a postback, I want to modify the SQL of the repeater's datasource, DEPENDING ON the value of the drop-down list. However, I can't evaluate the drop-down list submission at Page_Load, because the repeater has not yet been databound or rendered, so effectively the drop-down list doesn't yet exist.
2
1606
by: bigmentor | last post by:
Good Morning Folks I have bought and own a copy of ASPImage. Installed on my Internet server. Works like a Dream writing and saving image files containing text. My brain seems to have stopped working. I have tried to write a script that I expect cannot be more than ten lines long. The towel has been thrown in !!
1
2018
by: cerilocke | last post by:
I have a repeater in which I have a hidden field (input type = hidden), a textbox (asp:TextBox), a checkbox (input type = checkbox) and a label (asp:Label). I have bound all four items to the same bit field in a dataset, and when the items are first bound, all four are correctly databound. For example, if the stored procedure returns 1 for the value of the field, the value of the hidden field is True, the text that appears in the textbox...
0
10482
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10225
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.