|
Thanks for your response
Yes parent is id of div and i have given runat="server" with div tag
for your information my script in common place like inside .js file
and if i want to write same statement in page i get that ClientId
so can you please help me out how can i get div client id in common js?
Anish Patel
|
|
|
|
|
Are you the clientID of your div.
Try this
First assign the clientid in javascript variable like
var hdnCtlSelectedItem = "<%=Parent.ClientID%>";
then check whether the you are getting the clientid.and pass this ID to javascript function i external JS file
Afterthat access the divid using
document.getElementById(hdnCtlSelectedItem);
|
|
|
|
|
anish27patel wrote: var divId = document.getElementById('<%=Parent.ClientID%>');
Where is the above code written? In the external JS file? If yes, it is not gonna work. You need move this to your page, get the client id and pass to your JS method which may be in external file.
|
|
|
|
|
You cannot use server side code like document.getElementById('<%=Parent.ClientID%>'); in your external .js file.
Declare a global variable in your page and store the id of div tag in it.
Then refer this variable in the .js file to get the client id.
Declare this variable in your page:
var yourDivId = '<%=Parent.ClientID%>';
Write this code in the .js file to get the above div id
var objDiv = document.getElementById(yourDivId);
|
|
|
|
|
Hi all,
I have write a JavaScript function and calling the function on body load event,
in that function i am assigning a value to hidden field control. On Page behind i am need to use the hidden filed value in a function so i am accessing the field value but each and every time i am getting the value as "" (blank) because first the server side code execute and after that the JavaScript code execute. I want to run the JavaScript function before running server side code so that i can get the hidden field value. Please help me to solve the problem?
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Why are you assigning the value on body on load event?
|
|
|
|
|
Because,
On load event i am passing this value to a function and by using the value i am retrieving
data from my db.
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
i am working on an application which has seperate web projects under same solution.Instead of developing a master page for each and every project , Is there a way we can have a master page in solution level and use that master page in different projects under the same solution?
|
|
|
|
|
dotnetmember wrote: Is there a way we can have a master page in solution level and use that master page in different projects under the same solution?
I don't think so ! how will you going to access if this is out site of your web site ?
|
|
|
|
|
I give a suggestion,If you want to create same layout for your all web appliaction then use for the Web User Control and Custom Control for that.
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Hi all,
Can anyone tell me how I can put Google inner search in my website.
thank u in advance.
|
|
|
|
|
suzzain wrote: Can anyone tell me how I can put Google inner search in my website
you want to search your web site content using google ? or you to place google search in your web application ?
|
|
|
|
|
I want to place google search in my web application
|
|
|
|
|
|
|
Hi,
I have used the code bt im nt getting anything. If im missing something??
|
|
|
|
|
Sorry about that, Try this
This will help you
|
|
|
|
|
Hi,
It is also not working. Im unable to know whwt im missing??
Do I need to add anythingelse??
|
|
|
|
|
suzzain wrote: It is also not working. Im unable to know whwt im missing??
Do I need to add anythingelse??
Copy and paste the code in note pad. Save it as html file and run. Let me know the result.
check it out there,
Live[^]
|
|
|
|
|
Hi I did as u hv told. It is opening the google search results.
Bt hw can I use it in my web application for searching in my site??
|
|
|
|
|
suzzain wrote: hw can I use it in my web application for searching in my site??
That is totally different thing and I have asked the question to you at the beginning .
|
|
|
|
|
Yes u r right my reply was
"I want to place google search in my web application"
that's I want google searching in my web site.
|
|
|
|
|
|
Ohh.... Man...you are still hanging with that . Why you are not reinstalling the VS ?
|
|
|
|
|
Hiiiii everyone..........I am building a online shopping website....I need some guidance......in my home page in the left panel,there is a treeview control. and whenever user clicks on link in left panel....details comes in right panel.....and on this result i want multiple images to display. what is the best way to show multiple images.......like showing in www.naaptol.com. If Gridview then please guide me a bit.
|
|
|
|