|
Microsoft SOAP Toolkit 3.0 isn't suitable for such task
|
|
|
|
|
hi,
how can i make the visited page unavailable after leaving the page,even if the user presses the back or forward button in browser?
thanks.
|
|
|
|
|
u can't. the browser that the user uses handles hystory like that. depending on the browser u target u might be able to find a way to trick the browser into thinking it never viewed that page
|
|
|
|
|
For a bit of a cheesy way, you could set display:none on your visited links and make sure the page expires imediatly so it must be reloaded when a user returns to it.
|
|
|
|
|
i have a list of words about 600 word ! i have a user that wana see some of the , for example when he types "m" , he can see the words start with "m" , or if he types "me" , he can see words start with "me" , but i wana do this with TEXTBOX or combobox .anybody know how to do this with VBSCRIPT or JAVASCRIPT??
Have good day and time
|
|
|
|
|
I have created some server controls programatically at runtime and these are fine, but I can't figure out how to access these controls at a later time ( ie after a button clicked:-
this is how I created the code
Label label = new Label();
// Set the label's Text and ID Properties
label.Text = fieldDesc;
label.ID = "label" + rowCount.ToString();
labelPH1.Controls.Add(label);
// Add a spacer in the form of an HTML element
labelPH1.Controls.Add(new LiteralControl(" "));
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(" "));
when all the data has been input in textboxes created the user clicks a button, but whan I try to extract the value from textBoxInput1 I get a compilation error, for example
private void buttonOk_Click(object sender, System.EventArgs e)
{
Response.Write("data " + textBoxInput1.Text);
}
I get the error :- the type or namespace textBoxInput cannot be found.
|
|
|
|
|
Because textBoxInput1 is not a variable!
this.Request.Form["textBoxInput1"] is one possible way how to get it's value.
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Hi i have a script im trying to get to work i need to split a date an re-join it back in a different order heres what i have so far, i can get it to split buti need to join it back into one again.
ages = request.querystring("age1")<br />
agesplit = Split(ages, ",")<br />
<br />
Dim agesplit(3)<br />
<br />
one = agesplit(0)<br />
two = agesplit(1)<br />
three = agesplit(2)<br />
<br />
Dim OneDimArray(3)<br />
<br />
OneDimArray(2) = one<br />
OneDimArray(0) = two<br />
OneDimArray(1) = three<br />
<br />
Dim strSentence<br />
strSentence = join(OneDimArray)
cheers
|
|
|
|
|
ages = request.querystring("age1")
agesplit = Split(ages, ",")
Dim agesplit(3)
one = agesplit(0)
two = agesplit(1)
three = agesplit(2)
Dim strSentence
strSentence = two & "/" & three & "/" & one
e.g., 31/12/2005 (dd/mm/yyyy) and u wanna to write it as
12/2005/31 (mm/yyyy/yy)
|
|
|
|
|
Don't dimension agesplit as an array. It's not an array, it's a variant that contains an array.
When you dimension an array in VBScript, you don't give the number of items, but the highest index to use. If you want an array with three items, the highest index will be two.
Dim ages, agesplit, strSentence<br />
Dim OneDimArray(2)<br />
<br />
ages = Request.QueryString("age1")<br />
agesplit = Split(ages, ",")<br />
<br />
one = agesplit(0)<br />
two = agesplit(1)<br />
three = agesplit(2)<br />
<br />
OneDimArray(2) = one<br />
OneDimArray(0) = two<br />
OneDimArray(1) = three<br />
<br />
strSentence = join(OneDimArray, ",")
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for the help so far well heres what im trying to do with not much luck, i hate betweens grrr
'Dimension variables<br />
Dim adoCon2 <br />
Dim rsUser2 <br />
Dim strSQL2 <br />
Dim lngRecordNo2 <br />
Dim access<br />
<br />
<br />
<br />
lngRecordNo2 = Request.QueryString("ID")<br />
<br />
<br />
<br />
times = request.querystring("age2")<br />
<br />
<br />
<br />
sDate2 = times<br />
myArray2 = Split(sDate2, "/")<br />
<br />
sNewDate2 = myArray2(1) & "/" & myArray2(0) & "/" & myArray2(2)<br />
<br />
<br />
Dim ages, agesplit, strSentence<br />
Dim OneDimArray(2)<br />
<br />
ages = Request.QueryString("age1")<br />
agesplit = Split(ages, "/")<br />
<br />
one = agesplit(0)<br />
two = agesplit(1)<br />
three = agesplit(2)<br />
<br />
OneDimArray(2) = one<br />
OneDimArray(0) = two<br />
OneDimArray(1) = three<br />
<br />
strSentence = join(OneDimArray, "/") <br />
<br />
'Create an ADO connection odject<br />
Set adoCon2 = Server.CreateObject("ADODB.Connection")<br />
<br />
'Set an active connection to the Connection object using a DSN-less connection<br />
adoCon2.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database.mdb")<br />
<br />
'Create an ADO recordset object<br />
Set rsUser2 = Server.CreateObject("ADODB.Recordset")<br />
<br />
'Initialise the strSQL variable with an SQL statement to query the database<br />
strSQL2 = "SELECT * FROM student WHERE dob BETWEEN #"&strSentence&"# AND #"&sNewDate2&"# Order By student_id ASC"<br />
<br />
<br />
'Open the recordset with the SQL query <br />
rsUser2.Open strSQL2, adoCon2 ...
|
|
|
|
|
When working with the database, I would suggest that you format the date according to ISO 8601, e.g. "yyyy-mm-dd". This format is totally unambigous (contrary to almost all other date formats), and the database should have no problems to dechiper it, regardles of what the date format might currently be on the server.
---
b { font-weight: normal; }
|
|
|
|
|
Ive cracked it thanks for the help
heres my final code snipet
<br />
Dim adoCon2 <br />
Dim rsUser2 <br />
Dim strSQL2 <br />
Dim lngRecordNo2 <br />
Dim access<br />
<br />
lngRecordNo2 = Request.QueryString("ID")<br />
<br />
times = request.querystring("age2")<br />
times2 = request.querystring("age1")<br />
<br />
sDate2 = times<br />
myArray2 = Split(sDate2, "/")<br />
<br />
sNewDate2 = myArray2(0) & "/" & myArray2(1) & "/" & myArray2(2)<br />
<br />
sDate = times2<br />
myArray = Split(sDate, "/")<br />
<br />
sNewDate = myArray(0) & "/" & myArray(1) & "/" & myArray(2)<br />
<br />
Set adoCon2 = Server.CreateObject("ADODB.Connection")<br />
<br />
adoCon2.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database.mdb")<br />
<br />
Set rsUser2 = Server.CreateObject("ADODB.Recordset")<br />
<br />
strSQL2 = "SELECT * FROM student WHERE dob BETWEEN #"&sNewDate&"# AND #"&sNewDate2&"# Order By student_id ASC"<br />
<br />
rsUser2.Open strSQL2, adoCon2<br />
<br />
|
|
|
|
|
Hi,
I'm a newbie trying to write a fairly simple web app in C# with two complex issues - I need to present a document dialog box to the user, let them select a (usually MS Word) document on their local drive(s) and store it in a SQL Server 2000 table/column. I'm wondering if someone has some sample code (preferably C#) and can tell me what type of column needs to be defined in SQL Server to hold the document.
I'll also need the reverse: pulling the document out (mostly Word documents) and displaying it in the browser window.
I'm basically trying to store and retrieve these Word documents from various users in SQL Server 2000.
Any help would REALLY be appreciated! Thank you very much in advance!
Mike L.
|
|
|
|
|
Hi Mike,
+ To display a dialog box which allows the user to select a document on the client machine and upload it to the server, you can use an input file element. You can find the article posted on CP as an example:
http://www.codeproject.com/aspnet/fileupload.asp[^]
+ To store the Word document in SQL, you can define a column of the image type.
+ To insert/retrieve the content of the word document, you can use the ADO.NET[^] to implement the functionality. In addition to the above example, you can check out tons of examples in MSDN[^], CP and the internet.
+ To display the word document in the browser, you can save the content to disk and simply use a link to point to the file. You can also write out the content to the output stream of the Reponse object. Again, the above fileupload article can give you an idea on the issue.
|
|
|
|
|
I've seen a lot of code that demos ISAPI extension apps that works for browser based applications. Now i hope some good people provide some examples and code on how to build the same thing (ISAPI dll) that especially works with non-browser based applications.
b2c
|
|
|
|
|
Balu,
You mean Windows apps right. ISAPI stands for Internet Server API. You can embed a Web Browser or make a call to ISAPI dll from your Windows app via C# WebRequest or a similar trick and read the response back just like web browser. Is'nt it?
Did this attend to your query?
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
I am trying to pop up a window from a link on a web page using the following code:
<br />
[head]<br />
[script etc etc]<br />
function popup(url)<br />
{<br />
window.open(url,'title','300,300');<br />
}<br />
[/script]<br />
[/head]<br />
<br />
[body]<br />
[a href='javascript:popup('someurl.html')']blahblah[/a]<br />
[/body]<br />
[edit]
The colon between javascript and popup is not showing up on this page but it is in the code
[/edit]
I have only shown the reqd bits so please don't tell me I missed out parts of the page
Now this works fine except if I use it in an IFrame on IE. On FF etc it works just as I would expect.
Does anybody have a clue if this is a security feature of IE? Or what is wrong?
Thanks
|
|
|
|
|
The problem is that you use the same delimiter for html attributes and javascript strings. The browser thinks that the attribute ends where you think that the string starts. To the browser, it's only this that makes sense of your anchor tag:
[a href='javascript:popup(']blahblah[/a]
This will of course cause an error. If you had error messages enabled in your browser, you would get the error in a popup. Now it only shows up in the status bar.
Use quotes for html attributes and apostrophes for javascript strings:
[a href="javascript:popup('someurl.html');"]blahblah[/a]
---
b { font-weight: normal; }
|
|
|
|
|
Thanks but that was my fault. No the delimeters aren't the same. I just typed them this way in the example code I posted.
Sorry.
|
|
|
|
|
Well, you get assistance on the code you show. If you don't show the code you use, you can't get help with it. If you need to shorten the code, make sure that the example still shows the faulty behaviour that you need to fix.
---
b { font-weight: normal; }
|
|
|
|
|
Hey all, I had a really beginner question for you as I somewhat come ino more and more interesting things with web development.
Suppose I have a website where every page has the same look and feel (e.g. A header which has a picture and some text or something). Suppose that I place this template on all pages, but one day I decide to change this template. What is the best way to set up such a system where this would be easy? Also, what if I wished to change the css styles throughout the actual pages of content themselves (i.e. a global css change). Is there a way to do this?
Thanks so much!
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
1. Have a header.asp (or whatever scripting language you are using) and a footer.asp that contain the (amazingly enough) page headers and footers. Include them on every page. Siteside changes are a matter of changing one file.
2. Have a stylesheet.css (name it whatever you want) and reference it in every page html header (the [head] [/head] area NOT the page header from 1. above).
|
|
|
|
|
Hello,
Has anyone seen any examples of a simple form & JavaScript that lets the user set the refresh time for example:
- 10s
- 20s
- 30s
Then have the option to disable the auto fresh?
Thanks for the help.
JD
|
|
|
|
|
JD
Simple. JavaScript Timer depends on window.setTimeout taking time in msec and a function to evaluate.
You may like to have a function to call this window.setTimeout. But be aware, you need to store the return reference somewhere in a global JavaScript array if you want to call clearTimeout
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|