Become a part of the TranceAddict community!Frequently Asked Questions - Please read this if you haven'tSearch the forums
TranceAddict Forums > Main Forums > Chill Out Room > javascript __doPostBack function - it wont work : (
  Last Thread   Next Thread
Share
Author
Thread    Post A Reply
UglyDave
i ran a marathon : )



Registered: Jan 2003
Location: Buncrana, Éire
javascript __doPostBack function - it wont work : (

Hi guys - wrong forum, yeah, but anything goes in here really..

k, i'm using the examt same piece of code on a different page on my site and it works fine.. but when i transferred it to another page i get an error saying "Microsoft JScript runtime error: Object expected"

here's the code:

code:
function DoPostBack() { __doPostBack('_ctl0_ContentPlaceHolder1_davemc', ''); document.getElementById('_ctl0_ContentPlaceHolder1_davemc').value = ''; }


purpose of code: open a new window containing a list of user uploaded files - let the user select the file, then transfer their selection back to the 'opener' window and add it to a .net control on the page.

any suggestions?

Thanks,

David

Old Post Jun-26-2007 23:09  Ireland
Click Here to See the Profile for UglyDave Click here to Send UglyDave a Private Message Visit UglyDave's homepage! Add UglyDave to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Marc Summers
I must behave



Registered: Jan 2005
Location: New York, USA

v


___________________
"You won a new refrigerator, great! Where you gonna put it?" - Tony Danza

Old Post Jun-26-2007 23:10 
Click Here to See the Profile for Marc Summers Click here to Send Marc Summers a Private Message Add Marc Summers to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Orbax
Supreme tranceaddict



Registered: Apr 2002
Location:

are the object fields providing the information named the same? When you say you just transferred the code isnt it expecting the same names such as a text object called Uname or something...

if its a function, the only thing that seems like it would change would be those names?

I do different coding so I dunno what im talking about

edit:

so like if a function is opening a page with the username = the object of UserName and on the new page its usersname it would break it.

Old Post Jun-26-2007 23:29  United States
Click Here to See the Profile for Orbax Click here to Send Orbax a Private Message Add Orbax to your buddy list Report this Post Reply w/Quote Edit/Delete Message
UglyDave
i ran a marathon : )



Registered: Jan 2003
Location: Buncrana, Éire

hmm.. think we might be thinking about different things here..

basically, borwser A, opens a new window - browser B.. The user selects an image file from B, then this code is executed (these links are all dynamically generated whent he page loads):

code:
< h ref="" onClick=javascr1pt:sendValue('ht tp://ww w.buncrana.com/Clients/Uploads/2.jpg');>ht tp://www.buncrana.com/Clients/Uploads/2.jpg ------------------- // the JS code for the sendValue() function: function sendValue(fileName) { window.opener.document.getElementById('_ctl0_ContentPlaceHolder1_davemc').value = fileName; window.opener.DoPostBack(); window.close(); }

Old Post Jun-26-2007 23:42  Ireland
Click Here to See the Profile for UglyDave Click here to Send UglyDave a Private Message Visit UglyDave's homepage! Add UglyDave to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Orbax
Supreme tranceaddict



Registered: Apr 2002
Location:

ermmm form method matter? sorry dude I dont program in web OOP lololol

Old Post Jun-26-2007 23:53  United States
Click Here to See the Profile for Orbax Click here to Send Orbax a Private Message Add Orbax to your buddy list Report this Post Reply w/Quote Edit/Delete Message
UglyDave
i ran a marathon : )



Registered: Jan 2003
Location: Buncrana, Éire

meh, it was a longshot.. askin a javascript question in a trance forum

cheers anyways dude!

Old Post Jun-26-2007 23:58  Ireland
Click Here to See the Profile for UglyDave Click here to Send UglyDave a Private Message Visit UglyDave's homepage! Add UglyDave to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Orbax
Supreme tranceaddict



Registered: Apr 2002
Location:

lol not that long of a shot. there are a lot of web junkies in here and they just arent posting.

Its hard to understand your full issue though. A new webpage may mean a new server, etc. Code doesnt magically break so the postback method is either referencing something that no longer exists or the server is translating it incorrectly and has the wrong version of java, ASP, or .NET.

I dont know if you made a testbed on your laptop and are now trying to copy it onto a different page on your own setup or translate it into your corporate environment.

There are a lot of variables depending on the scope of the "new page"

but...I just know basic oop, and how code typically functions. besides that stuff, I wish I knew more!

good luck!

Old Post Jun-27-2007 00:01  United States
Click Here to See the Profile for Orbax Click here to Send Orbax a Private Message Add Orbax to your buddy list Report this Post Reply w/Quote Edit/Delete Message
UglyDave
i ran a marathon : )



Registered: Jan 2003
Location: Buncrana, Éire

ya, it's a fairly hefty big website! been working on it for months..

still running it on my laptop.... haven't even tried it on the server yet, so fingers crossed! i think i'm in for a busy week!!

D

Old Post Jun-27-2007 00:12  Ireland
Click Here to See the Profile for UglyDave Click here to Send UglyDave a Private Message Visit UglyDave's homepage! Add UglyDave to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Orbax
Supreme tranceaddict



Registered: Apr 2002
Location:

hehe. I was just seeing if by asking a "I dont know about java" kind of question youd remember...wish I knew more places to think of where it could be wrong, but if its all on the same server and using the same pages as the other page...

I mean if you copy and paste that other page, it should still work, so its gotta be something on the transcribed page.

/javanoob

Old Post Jun-27-2007 00:24  United States
Click Here to See the Profile for Orbax Click here to Send Orbax a Private Message Add Orbax to your buddy list Report this Post Reply w/Quote Edit/Delete Message

TranceAddict Forums > Main Forums > Chill Out Room > javascript __doPostBack function - it wont work : (
Post New Thread    Post A Reply

 
Last Thread   Next Thread
Click here to listen to the sample!Pause playbackneed to know the name of this track [2005] [1]

Click here to listen to the sample!Pause playbackSalt Tank - "Eugina 2000" (Progressive Summer Mix) [2003]

Show Printable Version | Subscribe to this Thread
Forum Jump:

All times are GMT. The time now is 01:27.

Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
HTML code is ON
vB code is ON
[IMG] code is ON
 
Search this Thread:

 
Contact Us - return to tranceaddict

Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
Support TA!