473,735 Members | 2,945 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Taking data from a text file to parse html page

DH
Hi,

I'm trying to strip the html and other useless junk from a html page..
Id like to create something like an automated text editor, where it
takes the keywords from a txt file and removes them from the html page
(replace the words in the html page with blank space) I'm new to python
and could use a little push in the right direction, any ideas on how to
implement this?

Thanks!

Aug 24 '06 #1
13 4241
DH,
Could you be more specific describing what you have and what you want? You are addressing people, many of whom are good at
stripping useless junk once you tell them what 'useless junk' is.
Also it helps to post some of you data that you need to process and a sample of the same data as it should look once it is
processed.

Frederic

----- Original Message -----
From: "DH" <dy*********@gm ail.com>
Newsgroups: comp.lang.pytho n
To: <py*********@py thon.org>
Sent: Thursday, August 24, 2006 2:11 AM
Subject: Taking data from a text file to parse html page

Hi,

I'm trying to strip the html and other useless junk from a html page..
Id like to create something like an automated text editor, where it
takes the keywords from a txt file and removes them from the html page
(replace the words in the html page with blank space) I'm new to python
and could use a little push in the right direction, any ideas on how to
implement this?

Thanks!

--
http://mail.python.org/mailman/listinfo/python-list
Aug 24 '06 #2
DH wrote:
Hi,

I'm trying to strip the html and other useless junk from a html page..
Id like to create something like an automated text editor, where it
takes the keywords from a txt file and removes them from the html page
(replace the words in the html page with blank space) I'm new to python
and could use a little push in the right direction, any ideas on how to
implement this?

Thanks!
See Beautiful Soup: http://www.crummy.com/software/BeautifulSoup/
it will parse even badly formed HTML and allow you to extract/change
information as you wish.

-Larry Bates
Aug 24 '06 #3
DH
Frederic,
Good points...

I have a plain text file containing the html and words that I want
removed(keyword s) from the html file, after processing the html file it
would save it as a plain text file.

So the program would import the keywords, remove them from the html
file and save the html file as something.txt.

I would post the data but it's secret. I can post an example:

index.html (html page)

"
<div><p><em>&qu ot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;</em></p>
<p>-- Peter Norvig, <a class="referenc e"
"
replace.txt (keywords)
"
<div id="quote" class="homepage-box">

<div><p><em>&qu ot;

&quot;</em></p>

<p>-- Peter Norvig, <a class="referenc e"

"

something.txt(f ile after editing)

"

Python has been an important part of Google since the beginning, and
remains so as the system grows and evolves.
"
Larry,

I've looked into using BeatifulSoup but came to the conculsion that my
idea would work better in the end.
Thanks for the help.
Anthra Norell wrote:
DH,
Could you be more specific describing what you have and what you want? You are addressing people, many of whom are good at
stripping useless junk once you tell them what 'useless junk' is.
Also it helps to post some of you data that you need to process and a sample of the same data as it should look once it is
processed.

Frederic

----- Original Message -----
From: "DH" <dy*********@gm ail.com>
Newsgroups: comp.lang.pytho n
To: <py*********@py thon.org>
Sent: Thursday, August 24, 2006 2:11 AM
Subject: Taking data from a text file to parse html page

Hi,

I'm trying to strip the html and other useless junk from a html page..
Id like to create something like an automated text editor, where it
takes the keywords from a txt file and removes them from the html page
(replace the words in the html page with blank space) I'm new to python
and could use a little push in the right direction, any ideas on how to
implement this?

Thanks!

--
http://mail.python.org/mailman/listinfo/python-list
Aug 24 '06 #4
DH wrote:
I'm trying to strip the html and other useless junk from a html page..
Id like to create something like an automated text editor, where it
takes the keywords from a txt file and removes them from the html page
(replace the words in the html page with blank space)
[...]
I've looked into using BeatifulSoup but came to the conculsion that my
idea would work better in the end.
You could use BeautifulSoup anyway for the junk-removal part and then do
your magic. Even if it is not exactly what you want, it is a good idea to
try to reuse modules that are good at what they do.

--
Roberto Bonvallet
Aug 24 '06 #5
DH wrote:
I have a plain text file containing the html and words that I want
removed(keyword s) from the html file, after processing the html file it
would save it as a plain text file.

So the program would import the keywords, remove them from the html
file and save the html file as something.txt.

I would post the data but it's secret. I can post an example:

index.html (html page)

"
<div><p><em>&qu ot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;</em></p>
<p>-- Peter Norvig, <a class="referenc e"
"

replace.txt (keywords)
"
<div id="quote" class="homepage-box">

<div><p><em>&qu ot;

&quot;</em></p>

<p>-- Peter Norvig, <a class="referenc e"

"

something.txt(f ile after editing)

"

Python has been an important part of Google since the beginning, and
remains so as the system grows and evolves.
"
reading and writing files is described in the tutorial; see

http://pytut.infogami.com/node9.html

(scroll down to "Reading and Writing Files")

to do the replacement, you can use repeated calls to the "replace" method

http://pyref.infogami.com/str.replace

but that may cause problems if the replacement text contains things that
should be replaced. for an efficient way to do a "parallel" replace, see:

http://effbot.org/zone/python-replace.htm#multiple
</F>

Aug 24 '06 #6
DH
I found this
http://groups.google.com/group/comp....0ac6b1ac8cff51

Credit Jeremy Moles
-----------------------------------------------

finds = ("{", "}", "(", ")")
lines = file("foo.txt", "r").readlines( )

for line in lines:
for find in finds:
if find in line:
line.replace(fi nd, "")

print lines

-----------------------------------------------

I want something like
-----------------------------------------------

finds = file("replace.t xt")
lines = file("foo.txt", "r").readlines( )

for line in lines:
for find in finds:
if find in line:
line.replace(fi nd, "")

print lines

-----------------------------------------------

Fredrik Lundh wrote:
DH wrote:
I have a plain text file containing the html and words that I want
removed(keyword s) from the html file, after processing the html file it
would save it as a plain text file.

So the program would import the keywords, remove them from the html
file and save the html file as something.txt.

I would post the data but it's secret. I can post an example:

index.html (html page)

"
<div><p><em>&qu ot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;</em></p>
<p>-- Peter Norvig, <a class="referenc e"
"

replace.txt (keywords)
"
<div id="quote" class="homepage-box">

<div><p><em>&qu ot;

&quot;</em></p>

<p>-- Peter Norvig, <a class="referenc e"

"

something.txt(f ile after editing)

"

Python has been an important part of Google since the beginning, and
remains so as the system grows and evolves.
"

reading and writing files is described in the tutorial; see

http://pytut.infogami.com/node9.html

(scroll down to "Reading and Writing Files")

to do the replacement, you can use repeated calls to the "replace" method

http://pyref.infogami.com/str.replace

but that may cause problems if the replacement text contains things that
should be replaced. for an efficient way to do a "parallel" replace, see:

http://effbot.org/zone/python-replace.htm#multiple
</F>
Aug 24 '06 #7
You may also want to look at this stream editor:

http://cheeseshop.python.org/pypi/SE/2.2%20beta

It allows multiple replacements in a definition format of utmost simplicity:
>>your_exampl e = '''
<div><p><em>&qu ot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;</em></p>
<p>-- Peter Norvig, <a class="referenc e"
'''
>>import SE
Tag_Strippe r = SE.SE ('''
"~<(.|\n)*? >~=" # This pattern finds all tags and deletes them (replaces with nothing)
"~<!--(.|\n)*?-->~=" # This pattern deletes comments entirely even if they nest tags
''')
>>print Tag_Stripper (your_example)
&quot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;
-- Peter Norvig, <a class="referenc e"

Now you see a tag fragment. So you add another deletion to the Tag_Stripper (***):

Tag_Stripper = SE.SE ('''
"~<(.|\n)*? >~=" # This pattern finds all tags and deletes them (replaces with nothing)
"~<!--(.|\n)*?-->~=" # This pattern deletes commentsentirel y even if they nest tags
"<a class\="referen ce"=" # *** This deletes the fragment
# "-- Peter Norvig, <a class\="referen ce"=" # Or like this if Peter Norvig has to go too
''')
>>print Tag_Stripper (your_example)
&quot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;
-- Peter Norvig,

&quot; you can either translate or delete:

Tag_Stripper = SE.SE ('''
"~<(.|\n)*? >~=" # This pattern finds all tags and deletes them (replaces with nothing)
"~<!--(.|\n)*?-->~=" # This pattern deletes commentsentirel y even if they nest tags
"<a class\="referen ce"=" # This deletes the fragment
# "-- Peter Norvig, <a class=\\"refere nce\\"=" # Or like this if Peter Norvig has to go too
htm2iso.se # This is a file (contained in the SE package that translates all ampersand codes.
# Naming the file is all you need to do to include the replacements which it defines.
''')
>>print Tag_Stripper (your_example)
'Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
'
-- Peter Norvig,

If instead of "htm2iso.se " you write "&quot;=" you delete it and your output will be:

Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.

-- Peter Norvig,

Your Tag_Stripper also does files:
>>print Tag_Stripper ('my_file.htm', 'my_file_withou t_tags')
'my_file_withou t_tags'
A stream editor is not a substitute for a parser. It does handle more economically simple translation jobs like this one where a
parser does a lot of work which you don't need.

Regards

Frederic
----- Original Message -----
From: "DH" <dy*********@gm ail.com>
Newsgroups: comp.lang.pytho n
To: <py*********@py thon.org>
Sent: Thursday, August 24, 2006 7:41 PM
Subject: Re: Taking data from a text file to parse html page

I found this
http://groups.google.com/group/comp....ce+text+file&r
num=8#ad0ac6b1a c8cff51
>
Credit Jeremy Moles
-----------------------------------------------

finds = ("{", "}", "(", ")")
lines = file("foo.txt", "r").readlines( )

for line in lines:
for find in finds:
if find in line:
line.replace(fi nd, "")

print lines

-----------------------------------------------

I want something like
-----------------------------------------------

finds = file("replace.t xt")
lines = file("foo.txt", "r").readlines( )

for line in lines:
for find in finds:
if find in line:
line.replace(fi nd, "")

print lines

-----------------------------------------------

Fredrik Lundh wrote:
DH wrote:
I have a plain text file containing the html and words that I want
removed(keyword s) from the html file, after processing the html file it
would save it as a plain text file.
>
So the program would import the keywords, remove them from the html
file and save the html file as something.txt.
>
I would post the data but it's secret. I can post an example:
>
index.html (html page)
>
"
<div><p><em>&qu ot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;</em></p>
<p>-- Peter Norvig, <a class="referenc e"
"
>
replace.txt (keywords)
"
<div id="quote" class="homepage-box">
>
<div><p><em>&qu ot;
>
&quot;</em></p>
>
<p>-- Peter Norvig, <a class="referenc e"
>
"
>
something.txt(f ile after editing)
>
"
>
Python has been an important part of Google since the beginning, and
remains so as the system grows and evolves.
"
reading and writing files is described in the tutorial; see

http://pytut.infogami.com/node9.html

(scroll down to "Reading and Writing Files")

to do the replacement, you can use repeated calls to the "replace" method

http://pyref.infogami.com/str.replace

but that may cause problems if the replacement text contains things that
should be replaced. for an efficient way to do a "parallel" replace, see:

http://effbot.org/zone/python-replace.htm#multiple
</F>

--
http://mail.python.org/mailman/listinfo/python-list
Aug 24 '06 #8
DH
SE looks very helpful... I'm having a hell of a time installing it
though:

-----------------------------------------------------------------------------------------

foo@foo:~/Desktop/SE-2.2$ sudo python SETUP.PY install
running install
running build
running build_py
file SEL.py (for module SEL) not found
file SE.py (for module SE) not found
file SEL.py (for module SEL) not found
file SE.py (for module SE) not found

------------------------------------------------------------------------------------------
Anthra Norell wrote:
You may also want to look at this stream editor:

http://cheeseshop.python.org/pypi/SE/2.2%20beta

It allows multiple replacements in a definition format of utmost simplicity:
>your_example = '''
<div><p><em>&qu ot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;</em></p>
<p>-- Peter Norvig, <a class="referenc e"
'''
>import SE
Tag_Stripper = SE.SE ('''
"~<(.|\n)*? >~=" # This pattern finds all tags and deletes them (replaces with nothing)
"~<!--(.|\n)*?-->~=" # This pattern deletes comments entirely even if they nest tags
''')
>print Tag_Stripper (your_example)

&quot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;
-- Peter Norvig, <a class="referenc e"

Now you see a tag fragment. So you add another deletion to the Tag_Stripper (***):

Tag_Stripper = SE.SE ('''
"~<(.|\n)*? >~=" # This pattern finds all tags and deletes them (replaces with nothing)
"~<!--(.|\n)*?-->~=" # This pattern deletes commentsentirel y even if they nest tags
"<a class\="referen ce"=" # *** This deletes the fragment
# "-- Peter Norvig, <a class\="referen ce"=" # Or like this if Peter Norvig has to go too
''')
>print Tag_Stripper (your_example)

&quot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;
-- Peter Norvig,

&quot; you can either translate or delete:

Tag_Stripper = SE.SE ('''
"~<(.|\n)*? >~=" # This pattern finds all tags and deletes them (replaces with nothing)
"~<!--(.|\n)*?-->~=" # This pattern deletes commentsentirel y even if they nest tags
"<a class\="referen ce"=" # This deletes the fragment
# "-- Peter Norvig, <a class=\\"refere nce\\"=" # Or like this if Peter Norvig has to go too
htm2iso.se # This is a file (contained in the SE package that translates all ampersand codes.
# Naming the file is all you need to do to include the replacements which it defines.
''')
>print Tag_Stripper (your_example)

'Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
'
-- Peter Norvig,

If instead of "htm2iso.se " you write "&quot;=" you delete it and your output will be:

Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.

-- Peter Norvig,

Your Tag_Stripper also does files:
>print Tag_Stripper ('my_file.htm', 'my_file_withou t_tags')
'my_file_withou t_tags'
A stream editor is not a substitute for a parser. It does handle more economically simple translation jobs like this one where a
parser does a lot of work which you don't need.

Regards

Frederic
----- Original Message -----
From: "DH" <dy*********@gm ail.com>
Newsgroups: comp.lang.pytho n
To: <py*********@py thon.org>
Sent: Thursday, August 24, 2006 7:41 PM
Subject: Re: Taking data from a text file to parse html page

I found this
http://groups.google.com/group/comp....ce+text+file&r
num=8#ad0ac6b1a c8cff51

Credit Jeremy Moles
-----------------------------------------------

finds = ("{", "}", "(", ")")
lines = file("foo.txt", "r").readlines( )

for line in lines:
for find in finds:
if find in line:
line.replace(fi nd, "")

print lines

-----------------------------------------------

I want something like
-----------------------------------------------

finds = file("replace.t xt")
lines = file("foo.txt", "r").readlines( )

for line in lines:
for find in finds:
if find in line:
line.replace(fi nd, "")

print lines

-----------------------------------------------

Fredrik Lundh wrote:
DH wrote:
>
I have a plain text file containing the html and words that I want
removed(keyword s) from the html file, after processing the html file it
would save it as a plain text file.

So the program would import the keywords, remove them from the html
file and save the html file as something.txt.

I would post the data but it's secret. I can post an example:

index.html (html page)

"
<div><p><em>&qu ot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;</em></p>
<p>-- Peter Norvig, <a class="referenc e"
"

replace.txt (keywords)
"
<div id="quote" class="homepage-box">

<div><p><em>&qu ot;

&quot;</em></p>

<p>-- Peter Norvig, <a class="referenc e"

"

something.txt(f ile after editing)

"

Python has been an important part of Google since the beginning, and
remains so as the system grows and evolves.
"
>
reading and writing files is described in the tutorial; see
>
http://pytut.infogami.com/node9.html
>
(scroll down to "Reading and Writing Files")
>
to do the replacement, you can use repeated calls to the "replace" method
>
http://pyref.infogami.com/str.replace
>
but that may cause problems if the replacement text contains things that
should be replaced. for an efficient way to do a "parallel" replace, see:
>
http://effbot.org/zone/python-replace.htm#multiple
>
>
</F>
--
http://mail.python.org/mailman/listinfo/python-list
Aug 25 '06 #9
Surely you write your own programs. (program_name.p y). You import and run them. You may put SE.PY and SEL.PY into the same
directory. That's all.
Or if you prefer to keep other people's stuff in a different directory, just make sure that directory is in "sys.path",
because that is where import looks. Check for that directory's presence in the sys.path list:
>>sys.path
['C:\\Python24\\ Lib\\idlelib', 'C:\\', 'C:\\PYTHON24\\ DLLs', 'C:\\PYTHON24\\ lib', 'C:\\PYTHON24\\ lib\\plat-win',
'C:\\PYTHON24\\ lib\\lib-tk' (... etc) ]

Supposing it isn't there, add it:
>>sys.path.appe nd ('/python/code/other_peoples_s tuff')
import SE
That should do it. Let me know if it works. Else just keep asking.

Frederic
----- Original Message -----
From: "DH" <dy*********@gm ail.com>
Newsgroups: comp.lang.pytho n
To: <py*********@py thon.org>
Sent: Friday, August 25, 2006 4:40 AM
Subject: Re: Taking data from a text file to parse html page

SE looks very helpful... I'm having a hell of a time installing it
though:

-----------------------------------------------------------------------------------------

foo@foo:~/Desktop/SE-2.2$ sudo python SETUP.PY install
running install
running build
running build_py
file SEL.py (for module SEL) not found
file SE.py (for module SE) not found
file SEL.py (for module SEL) not found
file SE.py (for module SE) not found

------------------------------------------------------------------------------------------
Anthra Norell wrote:
You may also want to look at this stream editor:

http://cheeseshop.python.org/pypi/SE/2.2%20beta

It allows multiple replacements in a definition format of utmost simplicity:
>>your_exampl e = '''
<div><p><em>&qu ot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;</em></p>
<p>-- Peter Norvig, <a class="referenc e"
'''
>>import SE
>>Tag_Strippe r = SE.SE ('''
"~<(.|\n)*? >~=" # This pattern finds all tags and deletes them (replaces with nothing)
"~<!--(.|\n)*?-->~=" # This pattern deletes comments entirely even if they nest tags
''')
>>print Tag_Stripper (your_example)
&quot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;
-- Peter Norvig, <a class="referenc e"

Now you see a tag fragment. So you add another deletion to the Tag_Stripper (***):

Tag_Stripper = SE.SE ('''
"~<(.|\n)*? >~=" # This pattern finds all tags and deletes them (replaces with nothing)
"~<!--(.|\n)*?-->~=" # This pattern deletes commentsentirel y even if they nest tags
"<a class\="referen ce"=" # *** This deletes the fragment
# "-- Peter Norvig, <a class\="referen ce"=" # Or like this if Peter Norvig has to go too
''')
>>print Tag_Stripper (your_example)
&quot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;
-- Peter Norvig,

&quot; you can either translate or delete:

Tag_Stripper = SE.SE ('''
"~<(.|\n)*? >~=" # This pattern finds all tags and deletes them (replaces with nothing)
"~<!--(.|\n)*?-->~=" # This pattern deletes commentsentirel y even if they nest tags
"<a class\="referen ce"=" # This deletes the fragment
# "-- Peter Norvig, <a class=\\"refere nce\\"=" # Or like this if Peter Norvig has to go too
htm2iso.se # This is a file (contained in the SE package that translates all ampersand codes.
# Naming the file is all you need to do to include the replacements which it defines.
''')
>>print Tag_Stripper (your_example)
'Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
'
-- Peter Norvig,

If instead of "htm2iso.se " you write "&quot;=" you delete it and your output will be:

Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.

-- Peter Norvig,

Your Tag_Stripper also does files:
>>print Tag_Stripper ('my_file.htm', 'my_file_withou t_tags')
'my_file_withou t_tags'
A stream editor is not a substitute for a parser. It does handle more economically simple translation jobs like this one where a
parser does a lot of work which you don't need.

Regards

Frederic
----- Original Message -----
From: "DH" <dy*********@gm ail.com>
Newsgroups: comp.lang.pytho n
To: <py*********@py thon.org>
Sent: Thursday, August 24, 2006 7:41 PM
Subject: Re: Taking data from a text file to parse html page

I found this
>
http://groups.google.com/group/comp....ce+text+file&r
num=8#ad0ac6b1a c8cff51
>
Credit Jeremy Moles
-----------------------------------------------
>
finds = ("{", "}", "(", ")")
lines = file("foo.txt", "r").readlines( )
>
for line in lines:
for find in finds:
if find in line:
line.replace(fi nd, "")
>
print lines
>
-----------------------------------------------
>
I want something like
-----------------------------------------------
>
finds = file("replace.t xt")
lines = file("foo.txt", "r").readlines( )
>
for line in lines:
for find in finds:
if find in line:
line.replace(fi nd, "")
>
print lines
>
-----------------------------------------------
>
>
>
Fredrik Lundh wrote:
DH wrote:

I have a plain text file containing the html and words that I want
removed(keyword s) from the html file, after processing the html file it
would save it as a plain text file.
>
So the program would import the keywords, remove them from the html
file and save the html file as something.txt.
>
I would post the data but it's secret. I can post an example:
>
index.html (html page)
>
"
<div><p><em>&qu ot;Python has been an important part of Google since the
beginning, and remains so as the system grows and evolves.
&quot;</em></p>
<p>-- Peter Norvig, <a class="referenc e"
"
>
replace.txt (keywords)
"
<div id="quote" class="homepage-box">
>
<div><p><em>&qu ot;
>
&quot;</em></p>
>
<p>-- Peter Norvig, <a class="referenc e"
>
"
>
something.txt(f ile after editing)
>
"
>
Python has been an important part of Google since the beginning, and
remains so as the system grows and evolves.
"

reading and writing files is described in the tutorial; see

http://pytut.infogami.com/node9.html

(scroll down to "Reading and Writing Files")

to do the replacement, you can use repeated calls to the "replace" method

http://pyref.infogami.com/str.replace

but that may cause problems if the replacement text contains things that
should be replaced. for an efficient way to do a "parallel" replace, see:

http://effbot.org/zone/python-replace.htm#multiple


</F>
>
--
http://mail.python.org/mailman/listinfo/python-list

--
http://mail.python.org/mailman/listinfo/python-list
Aug 25 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7485
by: Tesla | last post by:
Hey guys, i need help on writing PHP code to go to an HTML page (http://example:8343/index.html), and pass the text on that page onto a variable. I dont know how to do this. What i plan to do is parse through the variable to look for a list of some things so i can display it on my page. Can anyone please help? Thanks
1
2126
by: dawnunder | last post by:
eg. Someone fills out 3 fields. (There will be more but this is just to give you an idea) 1. Country? 2. State? 3. City I want this script to generate a web page and list the people by
3
9557
by: cv | last post by:
Hi all, I have to copy two set of data from 2 files(notepad/excel) say, products and their corresponding prices to list/textarea/table. I should be able to retrieve the product and corresponding price information from the control(list/textarea/table). Which is the best way? Quite urgent.. pls let me know. TIA, cv
6
6104
by: nate | last post by:
Hello, Does anyone know where I can find an ASP server side script written in JavaScript to parse text fields from a form method='POST' using enctype='multipart/form-data'? I'd also like it to parse the filename. <form name='form1' method='POST' enctype='multipart/form-data' action='sub.asp'> <input type='text' name='title1' value='value1'> <input type='file' name='file1'>
3
1601
by: Colin Young | last post by:
I'm having a bit of a problem with my DataList when I try to update from the user's input. I've included relevant excerpts at the end of this message. In the UpdateCommand code, the "PageLevelTextBox" appears to be found (it isn't returning null), but the Text property is an empty string (""). Am I missing something really obvious? Thanks Colin
16
1422
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that field... This grid displayes results based on users search.. public static int numberDiv; private void Page_Load(object sender, System.EventArgs e) {
7
2312
by: hawat.thufir | last post by:
Given an xhtml file, how can I "export" the data to plain-text? That is, I want: google www.google.com Whereas, if I copy and paste what the browser shows, I lose the URL and end up with: google
8
1840
by: Jeff | last post by:
I asked this question sometime ago. some help was given, but A.) i didn't understand the help and B.) I can't find the post. i am looking for a way to take a table of stats on an HTML page, and turn the data into variables, and upload to a DB using ASP. say if a page contained stats from a golf tournament, i would be able to pull the data and insert it into a db table on MY server. can someone help me with this??
4
9759
by: MissElegant | last post by:
Hi all, I have tried to do a test to a lesson which was in the internet, but it doesn't work? ANYBody here to help please?? The problem that what I enter in the textbox should be sent to the database to be stored, but it doesn't.!!! I don't know why the aspx. page...
0
8959
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9462
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9199
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6747
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4558
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4821
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2187
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.