HTML-TokeParser-Simple - Re: Author and Maintainer

Posted on Mon Feb 28 23:18:00 2005 by rshandy in response to 162 (See the whole thread of 6)
Re: Author and Maintainer
Hi Ovid:
Thanks for your response.
OOPS!! I feel really stupid. I didn't realize the server was down and therefore gave you an error on my test page:

AnywayHere's answers to your questions for clarity: 1. What are you trying to do.

I have a website that,on the product pages I change several values of div tags when the visitor clicks on a graphic (i.e. price, product name, etc). When I click on the graphic, the data is pull from an array in the header tag. SoftCart parses the pages and writes the interpreted value of this tag in the array. I'm now adding many more fields that have to change onclick. That would make the array quite large and take forever to load the page.

I want to be able to create an external .js file from a perl script call that will interpret only the product that the user clicks on

Here's a sample page of the product page:

http://www.dog-crates.com/scstore/product_test.html

Before I get ahead of myself, I first wanted to create a "standalone" perl script to write softcart interpreted data to a text file, namely, selector2.txt

This is where I'm at now...

So, I'm trying to strip the tags from the parsed html page and write the values to selector2.txt.(the reverse of what you thought).

the %%product(99901BB).micro_description%% is a softcart tag which needs SoftCart.exe to for it to intrepret it. In order for softcart.exe to run it's path is parsed in the url - adding the cgi-bin/SoftCart.exe in every page.

2. How I'm trying to do it

The code I posted is pretty straightforward for a quick snippet - now that the server is actually parsing the pages!! 3.What results you expect.

I expect the selector2.txt file to contain the interpreted data - and should look like this:

Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:

The smallest of the lifestyle series, this 2 liter twin turbo really packs a wallop. Able to leap tall buildings with a single bound. Use this crate for small dogs, such as pekinese, Yorkies, and fendermen benz.The smallest of the lifestyle series, this 2 liter twin turbo really packs a wallop. Able to leap tall buildings with a single bound. Use this crate for small dogs, such as pekinese, Yorkies, and fendermen benz.

4. What results you are getting.

This is what the file selector2.txt contains:

Below is the description of SKU 99901BB that has been properly interpreted by SoftCart:

%%product(99901BB).micro_description%%%%product(99901BB).micro_description%% :

Well, I hope that makes things a little clearer. Let me know what you think. Thanks again. Rich
Direct Responses: 167 | Write a response