|
Hi,
Sorry, guess you are right - I will try to ask the question in another forum...
Cheers,
Sten
|
|
|
|
|
No worries, man.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi all,
I am trying to access the asp:panel Id inside the javascript like this
document.all("panel2") and it works fine in IE browser.
But with firefox this is errors out.
I tried
var panelvar= document.all("panel2")||document.getelementbyid("panel2) it failed
Any suggesionts please......
code
|
|
|
|
|
Never mind I found the solution
var ie=document.all;
if (ie)
document.all("Panel2").style.display = "none";
else
document.getElementById("Panel2").style.display="none";
code
|
|
|
|
|
Don't write special code for IE. Just use the standard compliant code, that works just fine in IE too:
document.getElementById("Panel2").style.display="none";
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi Guffa,
Thanks for taking ur time to reply. Since panel is a asp control, IE used document.all to retreive the id. Crazy syntax. This has been done to differentiate between asp control and html control
code
|
|
|
|
|
nirmalamari wrote: Since panel is a asp control, IE used document.all to retreive the id. Crazy syntax. This has been done to differentiate between asp control and html control
That doesn't really make any sense. It doesn't matter how the html code is generated on the server, in the browser it's all html elements. You can't access the panel in the browser, as there is no panel in the page. What you access is the div element that the panel has rendered in the html code.
There is no panel.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi,
Our web application has a feature that allows users to create their print templates (include header/footer and font settings) and print their documents with the templates. The users also are provided ability to save the document after applied Print template as HTML document instead printing to Papers. Since the print templates define Header/Footer need to be displayed in the HTML document when Print & Print Preview, we need to implement an Active X control to resolve some following things:
- Ability to override IE's header/footer by users' header/footer when the users click Print or Print Preview in IE
- Ability to override IE's page size & margins by users' papge size & margins when the users click Print or Print Preview in IE
Please let me know the Active X control can resolve the 2 requirements above and work with HTML page? And are there any disadvatages or limitation of it? If you know any related topic, please help forward to me.
I'm also looking for a third-party that can resolve those requirements. Let me know if you know any.
Appreciate your help.
Ha
-- modified at 11:06 Thursday 1st November, 2007
|
|
|
|
|
|
Thanks for your suggestion. I know about ScriptX control. We also used that control with evaluation license for ASP.NET page and the license validated by domain name. Our problem is the HTML page that run locally on user's workstation (the users just simply double-clicks the html file and view in IE) so I am not sure ScriptX works that way or not? Any advices?
Ha
|
|
|
|
|
I have an asp page that uses javascript
<textarea rows="2" cols="20" name="emailto" ID="Textarea2"><%=emailto%></textarea><input type="button" onclick="javascript:window.open('page2.aspx?returnto=document.form1.Textarea2&forms=yes¤t=<%=emailto%>&Action=EmailTo','', 'width=600px,height=400px,scrollbars=1,top=100');" value=">" name="findemail" ID="Button2">
The window pops up and has a textbox, they enter a name and search, then the results are displayed in a datagrid. The datagrid has a template column that is a link. When they click the link I want a particular value to go back to the asp page and display in a textbox. Here is the code for the link. I put this in the datagrid item command and when e.commandname = select it will run.
Dim valretto As String = Request.QueryString("returnto")
Dim current As String = Request.QueryString("current")
TxtValue.Text = e.Item.Cells(3).Text
Dim strjscript As String = "<script language=""javascript"">"
strjscript &= "window.opener." & valretto & " = '" & TxtValue.Text & "" + "," + " " & current & " ';window.opener." & valretto & ".focus();self.close();"
strjscript &= "</script>"
Literal1.Text = strjscript
e.Item.Cells(0).Attributes.Add("onclick", "strjscript;self.close();")
I can see it gets the correct value but it does not close the window and pass it back to the first page. When I take off to display errors I get an error Microsoft JScript runtime error: Object doesn't support this property or method
Can I not do this between an asp and aspx page because of server side client side issues? I am trying to avoid changing the asp page to a .net page right now.
Thanks!
|
|
|
|
|
moose11 wrote: Microsoft JScript runtime error: Object doesn't support this property or method
What does the debugger indicate after opening the code?
|
|
|
|
|
I am debugging in visual studio, is that what you are referring to? If so....
When going through debugging it does not indicate anything, except when it gives the runtime error. Unless I am not looking in the correct place. But all the information is pulled and put into the javascript string.
Thanks!
|
|
|
|
|
Hi,
this is my code
<br />
<inputid="maildestinataire"name="maildestinataire"type="text"runat="server"/><br />
<asp:RegularExpressionValidatorID="Regmail1"runat="server"ErrorMessage="Le format de l'email est incorrect."ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"ControlToValidate="maildestinataire"></asp:RegularExpressionValidator><br />
<inputid="envoyer"type="button"onclick="javascript:NoticeFriend();"value="envoyer"/><br />
How can i check if Regmail1 is Valid with javascript function NoticeFriend()
thank you in advance
-- modified at 10:28 Wednesday 31st October, 2007
|
|
|
|
|
I'd like to try my hand at a GreaseMonkey script for a local Community Server based forum. I want to override the Quote button to only quote selected text. Where should I start? I know this is a bit broad a question, but I've got lots of time to get my hands dirty, and would just like some tips as to where to start?
Get the page source, modify until the desired effect, then factor out into GreaseMonkey?
|
|
|
|
|
Keep in mind, GM scripts run after page the page is already built (for the most part).
Sounds like you want to:
- Remove existing event handlers for the button (use FireBug to watch the events that occur when it's clicked, read through the code that attaches them, or just clear any onclick attributes if that's how they did it).
- Add your own handler
- For the mousedown event so as to avoid destroying the selection.
- Or, for the click event, but add a mouseover handler that saves the selection first.
- In your handler, take the selected text, format it as a quotation, and insert it into the textarea.
every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- C hris L osinger, Online Poker Players?
|
|
|
|
|
Cool, that should keep me busy till at least next week, thanks.
I somehow had you answering this question in mind when I posted it.
|
|
|
|
|
hi,
In my appication i'm using Oracle as a back end. In that when i'm using ExecuteReader() it shows an exception. Can any one of help me to solve this issue.
<br />
oleDBConnection = new OleDbConnection(connectString); <br />
string query = "SELECT V_FIRST_NAME,V_LAST_NAME,V_PHONE_NUMBER,V_EMAIL,V_FAX_NUMBER,V_ADDRESS,V_TITLE,V_POSTAL_CODE,V_COUNTRY from UserDetails where (V_USER_ID = ?) AND (V_PASSWORD = ?)";<br />
<br />
OleDbCommand oledbCmd = new OleDbCommand(query, oleDBConnection);<br />
oledbCmd.CommandText = query;<br />
<br />
oledbCmd.CommandType = CommandType.Text;<br />
<br />
OleDbParameter par = oledbCmd.Parameters.Add("UserName", OleDbType.VarWChar, 50);<br />
OleDbParameter parm = oledbCmd.Parameters.Add("password", OleDbType.VarWChar, 50);<br />
<br />
oledbCmd.Parameters["UserName"].Value = userName;<br />
oledbCmd.Parameters["password"].Value = password;<br />
<br />
oledbCmd.Connection = oleDBConnection;<br />
<br />
oleDBConnection.Open();<br />
<br />
OleDbDataReader dr ;<br />
dr = oledbCmd.ExecuteReader();<br />
It threw an exception when executing the last line. The exception states that Unspecified error.Oracle error occured,but error message could not retrieved from Oracle.Data Type is not supported.
|
|
|
|
|
Don't double-post.
Paul Marfleet
|
|
|
|
|
i have build a website now i want to deploy it. because i hav uploaded it at server without publishing it first, index page works but remaining did not worked there . someone of my friends told me to deploy/publish it first. i have tried but not working tell me step by step procedure.
best regards
i m Chan Naseeb from Pakistan
|
|
|
|
|
Actually, it should work if you just upload everything on your webserver. (you are talking about ASP.NET 2.0, right?) I did like that once and it was working fine.. but your website won't optimized. So, you can use deploy/publish option to pre-compile the website...
chancomsats wrote: emaining did not worked there
What error are you getting? Are you sure that you uploaded everything (all required dlls)?
|
|
|
|
|
What web server are you using? Sounds like you've got to take a look at the server settings
Among the top items on your checklist should be...
Account settings and permissions
virtual directories
framework settings
|
|
|
|
|
i just want to include news portion on my website so the users can share recent news of their department
plsease help me out how do i made gui for it secondaly help me regarding coding
regards
|
|
|
|
|
Pay attention to forum guideline no.2
Paul Marfleet
|
|
|
|
|
function ReadFileToString(strFileName)
{
var strContents;
strContents = "";
objFSO = new ActiveXObject("Scripting.FileSystemObject");
if (objFSO.FileExists(strFileName))
{
strContents = objFSO.OpenTextFile(strFileName, 1).ReadAll();
objFSO.CopyFile("C:/Winter.tif","http:\\192.168.5.2\share\Winter.tif")
}
return strContents;
} //end of function
|
|
|
|