|
I am working on a VB.NET project which has two pages in it. When I click a node in the left menu then a right page loads. Basically I am doing this on the client side using javascript, i.e I apply xslt on a xml on the client side to render HTML to the right frame.
Now I need to include a splash screeen which pops up before the right page loads.Can any body help me on this either using javascript or in vb.net.If some body can post some code it will be of great help.
Thanks in advance,
|
|
|
|
|
You need to use window.open to redirect to a URL that shows the splash screen, and contains a timer to close itself ( so it behaves like a splash screen ). window.open may be wrong, I haven't used jscript for a long time, thank goodness.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
I haven't used jscript for a long time, thank goodness .
Sorry ,but why is this in red block ?
|
|
|
|
|
Hello, all,
How can I make the height of a textarea box changes dynamically based on how many rows in the textarea. So when the user are typing, if the content of the textarea needs more room to display, a new row will be added to the textarea. Is it possible to do this? How can I detect that a new line is generated?
Thank you very much in advance.
Bin
|
|
|
|
|
Hi there,
To dynamically increase the height of the textarea, you simply set the rows property. Normally, the user presses Enter to begin a new line, so you can check that to decide if you need to increase the rows property of the textarea. Here is the sample code for doing that:
function AddRow(e)
{
if(e.keyCode == 13)
{
var txtArea = document.getElementById("TEXTAREA1");
txtArea.rows = txtArea.rows + 1;
}
}
<TEXTAREA id="TEXTAREA1" onkeypress="AddRow(event);" ... ></TEXTAREA> Also, you might need to check when the user pastes the text into the textarea. However, when the rows is too big, the textarea won't look friendly, and I'm curious why the auto scrollbar does not help you here.
|
|
|
|
|
Hello, thanks for your reply. I'd like to know how I can detect the soft wrap return. I mean when the user keep typing to the end of the row, there will be a soft return inserted and a new line will be added. Is there a way to detect this?
I will put the textbox control in a table and make the height of that row and text box increase to fit the user's input. Why do I do this? Because in our desktop version software, we did it that way. My boss would love to see a web application can do it in the same way.
|
|
|
|
|
I'm not sure if there is a way to detect the soft line break since I haven't tried it yet. But IMHO, since the long text is automatically wrapped, so the soft line break might be detected based on the current position of the caret. If the new curent position while the user is typing is set back to 0, then perhaps a soft line break is added. If the new position is not reset, you can compare the value with the cols property of the textarea to check if there is a soft line break. Just an idea.
|
|
|
|
|
Thank you very much for your reply.
Can you tell me how I can get the current cursor position ( Not the mouse cursor position) in the textarea? I tried but cannot find it in the document tree.
|
|
|
|
|
Hi,
actually, all you need to do is to change the default overflow handling of the textarea control to "visible", like this:
<textarea id="textArea" style="overflow:visible"></textarea>
--
Regards,
Dag
|
|
|
|
|
hello , i wana have ado with javascript but i have some problems , help me with one simple sample that connect Access file to ado and that's all !!
Have good day and time
|
|
|
|
|
|
How do I set focus to server controls created dynamically:-
Code to create controls:-
TextBox textBoxInput = new TextBox();
// Set the Textbox Text and Id Properties
textBoxInput.Text = fieldDefault;
textBoxInput.ID = "textBoxInput" + rowCount.ToString();
textBoxInput.MaxLength = fieldLength;
textBoxPH1.Controls.Add(textBoxInput);
// Add a spacer in the form of an HTML element
textBoxPH1.Controls.Add(new LiteralControl(" "));
How do I set focus to these textboxes
Clueless
|
|
|
|
|
Hi there,
You need to emit a snippet of client side script to set focus on the textbox:
string script = "<script type='text/javascript'>
document.getElementById('" + textBoxInput.ClientID + "').focus();</script>";
Page.RegisterStartupScript("setFocus", script);
|
|
|
|
|
I tried this and it doesn't compile textBoxInput isn't a variable, it's created dynamically.
|
|
|
|
|
When do you want to set focus on the textbox?
+ You can place the above sample code right after your code to dynamically create the textbox.
+ You can place the above sample code in a web page, and you need to get reference to the dynamic textbox first. You can use the container of the textbox and call the FindControl method.
|
|
|
|
|
Helllo
I am using a datagrid in a web application(.NET). When an user clicks the grid I want an menu to appear, (something like windows right click). I was thinking of creating the menu and all the functionallity in VB 6.0 ActiveX, and importing the ocx into the web app and using it there...
Will this work?
Is there an better way to solwe this problem?
Spaz
|
|
|
|
|
Hi,
there are tons of options available that won't require the use of an ActiveX. ActiveX objects are dangerous and modern browsers, even IE, do not allow them to execute unless the client grants the rights to the domain. In many corporate environments end users will not be able to grant such rights.
However, an ActiveX is entirely unnecessary for this purpose, DHTML has sufficient features to implement a custom context menu. If you only need to support Internet Explorer, a simple alternative is to use the popup object; check out a sample of a custom context menu here.
--
Regards,
Dag
|
|
|
|
|
i have a vc project in which i call the function in a script file(test.cfg), it's a jscript file, now i met a problem, so i wanna debug the script file, but i don't know how to do this, i add debugger in the file, but it doesn't work. can anyone help me?thanks in advance
|
|
|
|
|
I seem to recall putting lots of message boxes to screen when I needed to debug script files.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi, Christian Graus, thanks for yor reply.
how could i pop up a message dialog in jscript? which function should i call?
by the way i call the script function in this way. this might be in another thread or process, are u sure popup message dialog works in this case?
CComPtr<iactivescript> spScript;
.....
CComDispatchDriver spDisp;
spScript->GetScriptDispatch(scriptfilename, &spDisp);
spDisp.Invoke1(L"fun1", &v);
|
|
|
|
|
HeartFriend wrote:
how could i pop up a message dialog in jscript? which function should i call?
From memory, it's alert("message");
HeartFriend wrote:
this might be in another thread or process, are u sure popup message dialog works in this case?
No, I'm not.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Does anybody knows about Image Resizing Utility or Custom Tag for Cold Fusion ?
Or maybe some hints how to handle with this task ?
By The Way .. If exists free sources of C++/Java Image Resizing Utilities - they are also welcome !
Main processing formats - Jpeg (Gif)
Better Free of course ...
Thanks in advance !
|
|
|
|
|
|
Hi,
I'm developing an applicatio in C#(web) and I need to build some Graphs, this application is used to monitor traffic, in a ISP Link, I would like to know what's is the best, easiest and free tool to use it ?
Nowadays, it's in perl using rrdTool, and they want a new automatized application to do it !
-----------------------------
Visite: http://zopostyle.com
|
|
|
|
|
zopostyle wrote:
the best, easiest and free tool to use it ?
These are competing objectives. The best tool is probably not free.
I seem to recall there's a library for doing graphs in C# on this site though, have you looked ?
Christian Graus - Microsoft MVP - C++
|
|
|
|