|
Hello this is my 1rst ? here...so pls be patient...
-I did search the forums, but couldn't find any answers or help to my question>>>How do I insert a new value/text to a DropDown listbox from a ModalDialog window?
(Note:: I have several alert windows showing the value being returned, but the page does not refresh with the new value IN the drop down list...)
I'm a ASP.NET developer so javascript isn't my foretay...Any assistance would be greatly appreciated...TY in advance.
Below find samples of my client side code~
__________________________________________________
function callAddVendor()
{
var retval="";
//This might not be working wasn't sure so I stopped using it...I believe the format is correct tho~
var Drop=document.getElementById("ddlOne");
len = Drop.options.length;
//test that we are getting a value from the droplist--This works
window.alert(document.getElementById("ddlOne").options[0].value);
//This works a value does comeback from the window I just entered a value into a textbox and sent it back to the parent window
retval=window.showModalDialog('Dialoghost.htm',window);
//This appears to add a value to the dropdown list-but AFTER the script is finish working it DOESN'T populate the list!
document.getElementById("ddlOne").options[1] = new Option(retval,retval);
document.getElementById("ddlOne").options[1].selected = true;
//This a test window to show the value added to the dropdownlist--This works
window.alert(document.getElementById("ddlOne").options[1].value);
//This works!
document.Form1.txtDate.value = document.getElementById("ddlOne").options[1].value;
}
'---The code behind page...Only 1 line of code!!!
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'--This works
btnSubmit.Attributes.Add("OnClick", "callAddVendor();")
End Sub
...time is not on our side
|
|
|
|
|
I want to create a search engine which will search the pages of my site through meta tag. i donot want to use index server so wht objects/method shold i use in asp plz help me
|
|
|
|
|
Many search engines are available which can do this. One such is Zoom Indexer from Wren Software. This javascript search engine can be set to index titles, text content, or meta tag content (or all of these). There is a freebie version, as well as two shareware versions.
I'm sure you can find others like this one by googling on "javascript search engines".
|
|
|
|
|
If you don't care about showing the results in your site design you can use Google's site keyword like so:
site:www.dirq.net chipped
Dirk Watkins
|
|
|
|
|
Hello Friends,
This is Pratik Patel, Pune, India. I have query regarding working of windows authentication. I am aware about the fact that windows authentication in .NET is done using Active Directory on the server. But this is not working as it is mention in document. I have tried using several credentials which are present in the domain server, but it is giving error of "unauthorized access"
Please let me know if you have any idea on it, or please share the link which can really help meon this.
Thanks in advance,
Pratik Patel
Pune,
India.
|
|
|
|
|
Is there a way to import a sql database from VS into Frontpage? I have made a layout for my webpage in frontpage, and using Visual Studio, I made a sql database that will bring up the last 30 things that went through production and tell if they were good. NOw how would I bring it into Frontpage so the results are still viewable?
|
|
|
|
|
how to find the offsetwidth in netscape 8.0
I am populating a div(content) with container(div)
I am trying to get the offsetwidth of the content after it is getting populated with datareader which is there inside ending in vain.
Any help solicited.
|
|
|
|
|
Hi,
I am working on a ASP.NET application. I want to show real time data on the page. I have tried different ways like
1. ActivX Component
2. Refreshing page after certain time
I have heard about a concept called pushing data on the page. Can anybody tell me how to do that. If you have any other idea please let me know.
Vaibhav P. Poonekar
|
|
|
|
|
try to use javascript timer
-----
Samara, Russia
|
|
|
|
|
There is no support for server push in http.
If you want to send data directly to the client, you have to put a component or applet on the page that can establish the connection to the server an recieve the data.
The normal way for a web page to work is to request data from the server. You don't need to update the entire page, though, you can request the data into a hidden frame or use the xmlhttp component, and use javascript to update the data on the page.
---
b { font-weight: normal; }
|
|
|
|
|
Anybody know how to print from tomcat server, please tell how. Thank
|
|
|
|
|
how to know whether a javascript file was loaded to client. Thank!!!!!!
|
|
|
|
|
You can create a variable in the javascript file:
var MyNiceJavascriptFileLoaded = true;
Then you can check if the variable exists:
if (MyNiceJavascriptFileLoaded)
If the file was not loaded, the value of the variable will be undefined, and evalutes as false.
---
b { font-weight: normal; }
|
|
|
|
|
Do you mean the code was loaded and executed or you mean that he downloaded the file ?
"I am a liar." Is this statement true or false ?
|
|
|
|
|
Hi,
I am exporting some data which is in a table on the webpage to excel on click of a button which I created on the same webpage as the table. I am using the excel object model here.
My problem is it exports to excel the way I wanted but for some reason it reloads the web page too. I dont know what to do in order to just export it to excel but not reload the page.
Please let me know
|
|
|
|
|
Can anybody help on this please
|
|
|
|
|
On ASP.NET use the Page.IsPostBack property during page load. This way you can avoid reload of the page when button is clicked
hope this helps !
|
|
|
|
|
I have a problem with axWebBrowser, i have it navigating to a page but it doesn't seem to be loading it properly as when i try the GetElementsByTagName() it won't return any of the elements. I however know that the elements im trying to return exist. I does work for one element which is TITLE but it won't return any other ones. Has anyone got any ideas.
Cheers
Peter
|
|
|
|
|
Hi there,
I have no idea when you run your sample code, so IMO you might try calling the GetElementsByTagName method after the DocumentComplete event of the browser gets fired to make sure that document is successfully loaded.
|
|
|
|
|
Hey,
Yeah im actually running it in the DocumentComplete event, its funny because it orks perfectly for some websites its just a couple it doesn't. I wonder if its something to do with XHTML or DHTML. It will work fine for ebay, yahoo and egg but won't work for nwolb or rbsdigital
cheers
Peter
|
|
|
|
|
How to get the right URL before navigating the web page in the CHtmlView?
Class CHTMLControl derived from CHtmlView, and over load the virtual function OnBeforeNavigate2.
I Navigate an URL as following:
CHTMLControl* pHTMLControl;
…
pHTMLControl->Navigate2(strURL);
In the opened web page, there is a link whose html code is below:
<A href='javascriptclickProcess("search");'>Free Search</A>
After clicking on this link in the html view, the following function is called
void CHTMLControl::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel)
But in this function, the value of lpszURL is "javascriptclickProcess("search");"
How can I get the right URL of the next page before navigating it?
Thanks
|
|
|
|
|
superhandwolf wrote: How can I get the right URL of the next page before navigating it?
Put the right URL in the link?
|
|
|
|
|
Hi,
I am working on softphone. I want to change skin of softphone at Run time as like Skin changed in Winamp at run time.
Kindly send me referenc code and concept.
Thanks
Manoj
|
|
|
|
|
How can I make my images in a div container line up like so?:
The Layout
The code I've been trying to manipulate is:
<br />
<style><br />
<br />
#content {<br />
width: 612px;<br />
float:right;<br />
}<br />
<br />
<br />
.contentObj {<br />
padding: 0px 0px 10px 10px;<br />
float:left;<br />
}<br />
<br />
</style><br />
<br />
<div id="content"> <br />
<div class="contentObj"><img src="images/welcome_1x4.jpg" alt="I am a square!" border="0"></div><br />
<div class="contentObj"><img src="images/PromoWindow_1.25x4.jpg" alt="I am a square!" border="0"></div><br />
<div class="contentObj"><img src="images/forhim_1x2.jpg" alt="I am a square!" border="0"></div><br />
<div class="contentObj"><img src="images/forher_1x2.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/specialoffer_1x1.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/specialoffer_1x1.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/Itemofmonth_2x2.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/specialoffer_1x1.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/specialoffer_1x1.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/specialoffer_1x1.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/specialoffer_1x1.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/Itemofmonth_2x2.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/specialoffer_1x1.jpg" alt="I am a square!" border="0"></div> <br />
<div class="contentObj"><img src="images/specialoffer_1x1.jpg" alt="I am a square!" border="0"></div> <br />
</div> <br />
I thought float was meant to work horizontally then vertically. The trouble is I am getting gaps.
N.B. I won't neccessarily know which order the images will arrive in!
Many thanks for any help!
-- modified at 8:23 Wednesday 19th October, 2005
|
|
|
|
|
You should start by using <style> instead of <script>
|
|
|
|