|
This is bad code. It assumes a certain layout, and doesn't ever check if the object it is grabbing, exists.
When you say it does not work, what is the problem ? Does it work in firefox ? Firebug helps you debug javascript.
There are articles on CP about how to work with checked lists in javascript. Ideally you'd find a way to insert an id into each one so you could look up the elements by id instead of by array indices.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
if (listControl.tagName=='input' && listControl.type=='checkbox' && listControl.checked)
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:57pm.
|
|
|
|
|
hello all:
i have an application what i want to do in it is, i want to change the url so no user could see the parameters for example the url is www.CodeProject.com/Page.aspx?Id=Xmdwdr
Where Xmdwdr is an encryption
What i want the client to see is www.CodeProject.Com
Could any one help me with it
|
|
|
|
|
This is easily done in ASP.NET. Given you're not in the ASP.NET forum, I assume you're not using ASP.NET. No-one can really answer you without you telling us what you want to use.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Hey Allison. We have an ASP.NET forum.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Cristian,
Thanks, I was not certain if this should go under asp.net or web development. I will delete this post and start a new message under the asp.net section.
Allison
|
|
|
|
|
Anything to do with ASP.NET, goes there. Only because, there's a LOT more traffic there, so you're more likely to be seen there.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I want to make a script that fill the particular text boxes.
I want to paste this script in the browse window and the text boxes fill automatically.
can any one suggest how i do this.
Thanks....
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|
|
The only way to do this, is to have very specific knowledge of the format of a page, and then inject javascript that does what you want. It's not easy to do at all, I'm almost certain it would be beyond you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
yes. i know this. and i have a full knowledge of full page structure. can you provide any sample for fill the text box.
Thanks
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|
|
No, that's obviously impossible. I'd need to know the HTML first. You need to access the controls either by index, or by name. Then you'd need to write a program that requests the page, injects the javascript, and views it, probably a VB or C# program with a web browser control in it. Or a browser plug in.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I'm new to html programming...and...I need some help.
My friends and I play an internet game and I have agreed to keep a web page with our statistics. I would like to be able to update the html table on my page with data collected in .txt files that they send me.
My question then is how do you load a .txt file into a cell of an html table.
Thanks for your help!
|
|
|
|
|
There's no way to answer this question. We have no idea what it is you're doing ( that is, how you want to generate HTML ). If you're just writing HTML, then the answer is, manually. If your file is a csv, you could use search and replace intelligently to save your self some time, but that's about it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I thought the question was pretty clear.
I have .txt files with data in them.
I have an .html file that displays a webpage which has a table of data.
The web page has a table in it that I want to keep updated by somehow including the new data from the .txt files that my friends will continue to send me.
I have found code that will let me import a picture to my .html file ( <embed src="URL" /> ... ), but there doesn't seem to be a relative instruction for importing/embedding .txt files.
Thanks
|
|
|
|
|
Rickey Cooper wrote: I have found code that will let me import a picture to my .html file ( <embed src="URL" /> ... ), but there doesn't seem to be a relative instruction for importing/embedding .txt files.
No, there is no such thing. And embed is not the right way to put an image in your page, either. It's more for putting active X controls, such as flash, in your page.
This site is more for programmers. HTML is not programming. Therefore I was asking if you were doing any actual programming, or not. As you're not, your only option is to do what I said, I think my answer was pretty clear.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Rickey Cooper wrote: how do you load a .txt file into a cell of an html table.
In html there is no way to properly add the .txt file into a table. To do that you need your page to be dynamic, so you need to use an actual internet programming language like asp.net, php, etc. You can find lots of helpful articles on those languages on this very site.
By The Way: The proper code to add an image is
modified on Wednesday, October 21, 2009 12:06 AM
|
|
|
|
|
I am trying to use SQL Server Management Studio and bring in an .mdf file that is already listed in
C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA
There are a lot of other .mdf files listed there as well. The only one that appears in Object Explorer under
HKRAM\SQLEXPRESS(SQL Server 10.0.1600-HKRAM\my name\)
is Auburn Blue, which I created in MSFT SQL Server Management Studio. The file I want I created in VWD 2008 Express. It also resides in ...My Documents\Visual Studio 2008\WebSites\AuburnSQL\App_Data. Its size is the same but its Date Modified is a couple days more recent.
I can create a new database with the Database\New Database command. Where is the command to open an existing database?
What am I missing?
Mark H.
|
|
|
|
|
|
I want to create "views" of a web page, to do that I´m retrieving and editing the html code to show what I want in a new small webbrowser:
Dim PageHTMLBytes() As Byte
Dim htmlText as string = ""
PageHTMLBytes = webClient.DownloadData(url)
' Convert result from byte array to string
Dim utf8 As New UTF8Encoding()
htmlText = utf8.GetString(PageHTMLBytes)
...
-Edit of the html code-
...
miniWebBrowser.DocumentText = editedhtmlText
The problem is that one part of the editedhtmlText I´m showing, is a flash object which checks if you are logged in, but it doesn´t matter if I logged before, as soon as I set my own, edited code, the session is lost. I tried setting cookies like this:
Dim request As HttpWebRequest = WebRequest.Create("http://www.cam4.com")
'Set cookies.
request.CookieContainer = New CookieContainer()
request.CookieContainer.Add(New Cookie("user", "usuario1", "/", url))
request.CookieContainer.Add(New Cookie("password", "password1", "/", url))
Dim response As HttpWebResponse = request.GetResponse()
Dim reader As IO.StreamReader = New IO.StreamReader(response.GetResponseStream(), True)
Dim html As String = reader.ReadToEnd()
web.DocumentText = html
..which throws no errors but no luck at all in keeping my session. I started to fiddle about with webrequest and responses instead of downloading the html code, but I couldn´t go much further.
I´m on Windows XP 32 bits, VB 2008 Express, Net. Framework 2.0 SP1 (for legacy support). Some assistance on how can I aboard this problem will be appreciated.
|
|
|
|
|
Are you sure that the Flash object reads the user session info from cookies ?
The thing that you have to do, is to relogin automatically. Just in your request Handler, check any Session Value, if you find it null... force relogin using Request.Cookies
Hey, why dont you strip off the flash object in the preview mode. or just preview the snapshot of the page?? It would elevate the performance of the existing page.
|
|
|
|
|
Sorry I couldn´t answer before.
To tell you the truth I dont know if the flash object takes the session from cookies, and I don´t even know how to check for it. Also I never used request and response, so I´m pretty much in the clear.
UPDATE ---
More info, I tried looking at the cookies and the one controlling the login is named JSESSIONID, so it´s session based, not just an encrypted login and pass.
I tried setting webbrowser document.cookie, but no matter how I try I can´t edit that value, a google search revealed people with the same problem as me but no solutions. I got the impression that it can´t be done since it´s a security risk for web servers.
Back to the board I guess, I need to think workarounds.
modified on Tuesday, September 8, 2009 7:25 PM
|
|
|
|
|
Dear to all,i am creating a text box on aspx page in content place holder which based on master page when i run then i use to get this error
"Control 'ctl00_abc_TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server"
Plaese answer as early as possible
rizvan sivally
|
|
|
|
|
Dear to all
where abc is content placeholder id
rizvan sivally
|
|
|
|
|
Have you placed the ContentPlaceHolder inside Form of your MasterPage ??
<form id="form1" runat="server">
...
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
...
</form>
Check whether your MasterPage looks like this ...
|
|
|
|