replace numbers in class names by javascript - html

Why doesn't my script work?
I want to replace numbers in this code:
<!--m-->
<li class="g videobox" style="position:relative">
<div class="s">
<table class="ts" style="width:auto">
<tbody>
<tr>
<td style="padding-top:5px;padding-right:8px" valign="top" width="1%">
<div class="th" style="background-color:#000;height:68px;overflow:hidden;position:relative;width:120px">
<a id="v0" style="text-decoration:none" href="/url?url=http://www.dailymotion.com/video/xt80kj_2nd-september-2012-southampton-vs-manchester-united-2-3-hd_sport&rct=j&sa=X&ei=P2hEUIfkKYKk0QXppoHgCA&ved=0CDwQuAIwAA&q=manchester&usg=AFQjCNGmLl3hg6CUcX5MsuU-njXolHOOlQ">
<div style="position:relative;top:0px;left:0px">
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCABDAHgDASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAAAAUDBAYCBwH/xAA3EAACAQMDAgMGBQMDBQAAAAABAgMABBEFEiEGMRNBURQiYXGBkRUyocHRI0KxByUzUmKS4fD/xAAaAQACAwEBAAAAAAAAAAAAAAADBAACBQEG/8QALBEAAgIBAwIGAgAHAAAAAAAAAQIAAxEEEiExQQUTMlFhcRQiNEKBobHB8P/aAAwDAQACEQMRAD8A+a3Y2sWmQSEyBeeYYlyfuVq4uoWunJYTTQzPH4e0ZKBhkjuMZ+xpnf2Ek+hujAIV7B2C4/8AIUq1y1jfSLe3luY4PcCl/eYA+XCgg/enSgIDY7SunsFgFJPf/M0za6nsEVxBZnazbdsjtx8fMd6o6ZrN5Np17dwJHbybn/JGOMEjuF5+tdwW1oNKjBmk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U9YgPEP4R/qZaiiinZ4uWLNVczbgDiFiM+RxVeiipJPoODkUUUVJJ//2Q==" alt="" id="vidthumb1" class="th vidthumb1" style="display:inline-block;height:67px;margin:0px 0px 0px 0px;border:0;width:120px" align="middle" border="0" height="67" width="120">
</div>
<span class="vdur" style="right:0;background-color:#000;bottom:0;color:#000;filter:alpha(opacity=70);font-size:11px;font-weight:bold;opacity:0.7;-khtml-opacity:0.7;-moz-opacity:0.7;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">► 4:01</span>
<span class="vdur" style="right:0;bottom:0;color:#fff;font-size:11px;font-weight:bold;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">► 4:01</span>
</a>
</div>
</td>
<td style="padding-top:1px" valign="top">
<h3 class="r inl">
<a href="http://www.dailymotion.com/video/xt80kj_2nd-september-2012-southampton-vs-manchester-united-2-3-hd_sport" class="l" onmousedown="return rwt(this,'','0','','1','AFQjCNFZjowZj8K920o31HeauBkHuwmpzA','6LR8Li4Qt3qhz4xWQE49yQ','0CDsQtwIwAA',null,event)" title="2nd September 2012 Southampton vs Manchester United 2-3 [HD] - Video Dailymotion">2nd September 2012 Southampton vs <em>Manchester</em> <b>...</b>
</a>
</h3>
<div> <cite class="kv">dailymotion.com</cite>
<span class="st">
<span class="f">
<span style="background:#aaa;border:#999 1px solid;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;color:#fff;font-size:10px;font-weight:bold;margin-right:5px;padding:0 3px;text-transform:uppercase">New</span>
<span class="nobr">14 hours ago</span> - <span class="nobr">4 min</span>
</span>
<br>2nd September 2012 Southampton vs <em>Manchester</em> United 2-3 [HD]<br>
</span>
</div> </td>
</tr>
</tbody>
</table>
</div>
<!--n-->
<!--m-->
</li>
<li class="g videobox" style="position:relative">
<div class="s">
<table class="ts" style="width:auto">
<tbody>
<tr>
<td style="padding-top:5px;padding-right:8px" valign="top" width="1%">
<div class="th" style="background-color:#000;height:68px;overflow:hidden;position:relative;width:120px">
<a id="v0" style="text-decoration:none" href="/url?url=http://www.footytube.com/video/southampton-manchester-united-sep02-127801&rct=j&sa=X&ei=P2hEUIfkKYKk0QXppoHgCA&ved=0CD8QuAIwAQ&q=manchester&usg=AFQjCNGWDlz10zch_sUaWuQ63AO88LPtzA">
<div style="position:relative;top:-1px;left:0px">
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCABGAHgDASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAAAAUDBAYBAgf/xAA1EAACAQMDAgQDBgYDAQAAAAABAgMABBEFEiETMQZBUWEicYEUMjORobEHFRYjQsFSU9Hw/8QAGQEAAgMBAAAAAAAAAAAAAAAAAgMAAQQF/8QAIxEAAgICAgICAwEAAAAAAAAAAAECEQMhEjETQSJhBCMyUf/aAAwDAQACEQMRAD8A+c3IWWCJQxXIQZYeuKd6HqMmmkxxuXiD4whxvfHmPQDH0qobGW4trV4+ngxruDk5J/1Vn+WTQxiW3IeR1V4yF8/P5+VL6OjJxn6PM1zLFenUGuVLg7mdO6/8uP2+dbTRk1BLaIS6jbXMDSN1muwjOwx/bMZUgj0PvWQ13T7zS0t4bk280d4wmE8RbCuByhB7dwfzpro/hy7R1LJBD8IuFfO4KqkZX2JGabCbXaETgpwu+jQS+INuTLYampCMVLLtJC8DAI7kdquWlqL+8tJZZru0LIrLCXUHjB2nae/HPzNK/wCJAKtpjh9mbeRSSe+cVQ8JB5PEtoxnkmi6a7FZvuAf/CinJOtGaDdtom1DxnZWF1Pbvb3s8kVw0Z+NMkoSM+4NZ/WdTt9Ta7ubiHom52MYoxjZx8P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XeHxnV7fHk1Nf9oWutnnVUU6reHAz1n/eoo4MqZHISMdzVvVIY01G6kmY/isVQdzzVCWQzMMnAHYDypclTKIdTvorO0Z9oCL91R3Y1noLV0ni1bU76W2jYgp0eX9segpRrmoS3N/OjNtjjYqiD9T86nTUheRWUDFN1uCGRxnI7AkVphGkHGkaq31i3uLuWyjn6qcNEW43DA8vWr2zHlj60hvNLhnjsrqJhBcQhG3Jj4lyMj/ynszW6sWiuN8RAKtuHas+Rb0VI4yqT2rgUD7orz1It34gOe2CK7leDvznyyKVsA66DptlQPhNFDLhWBJ7HvRVoJIX2Vvm0gG5vwk/yPoKsBSg2hjz70UUTewjghGdxOTXtVCnI9v3ooqJ7IzR+LRuXTxnnpn/VLGH2Eb4/xc8N6UUU2fYBU3NI7OzEsTkk9zQVFFFIIYDxVbfZdXl2HiYdQD0z3/apdAv/ALPA1s8auhY7coMgtwcn60UVvj0EjWai3SuDDGQ+5Qz70A7DHHoavC2Zgro6N2OXjAIX0wOPaiik5G10WyuYJTlQ0QAG5m2ct6cduAccV5FtIpP9xPulfwh7UUUjk32CTAFYcZyADyaKKKAJH//Z" alt="" id="vidthumb2" class="th vidthumb2" style="display:inline-block;height:70px;margin:0px 0px 0px 0px;border:0;width:120px" align="middle" border="0" height="70" width="120">
</div>
<span class="vdur" style="right:0;background-color:#000;bottom:0;color:#000;filter:alpha(opacity=70);font-size:11px;font-weight:bold;opacity:0.7;-khtml-opacity:0.7;-moz-opacity:0.7;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">► 4:40</span>
<span class="vdur" style="right:0;bottom:0;color:#fff;font-size:11px;font-weight:bold;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">► 4:40</span>
</a>
</div>
</td>
<td style="padding-top:1px" valign="top">
<h3 class="r inl">
<a href="http://www.footytube.com/video/southampton-manchester-united-sep02-127801" class="l" onmousedown="return rwt(this,'','0','','2','AFQjCNE5svFiL4Af9K2TuhaGf4ydP-LjtQ','t7BFtngpHDrP_gEBAAj7eg','0CD4QtwIwAQ',null,event)" title="Southampton vs. Manchester United Video Highlights & Interviews (02nd Sep 12)">Southampton vs. <em>Manchester</em> United Video <b>...</b>
</a>
</h3>
<div> <cite class="kv">footytube.com</cite>
<span class="st">
<span class="f">
<span style="background:#aaa;border:#999 1px solid;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;color:#fff;font-size:10px;font-weight:bold;margin-right:5px;padding:0 3px;text-transform:uppercase">New</span>
<span class="nobr">13 hours ago</span> - <span class="nobr">5 min</span>
</span>
<br>Southampton v <em>Manchester</em> United video highlights, results and news. Match played on Sunday, Sep 02 2012 <b>...</b>
<br>
</span>
</div> </td>
</tr>
</tbody>
</table>
</div>
<!--n-->
<!--m-->
</li>
<li class="g videobox" style="position:relative">
<div class="s">
<table class="ts" style="width:auto">
<tbody>
<tr>
<td style="padding-top:5px;padding-right:8px" valign="top" width="1%">
<div class="th" style="background-color:#000;height:68px;overflow:hidden;position:relative;width:120px">
<a id="v0" style="text-decoration:none" href="/url?url=http://www.footytube.com/video/southampton-manchester-united-sep02-127812&rct=j&sa=X&ei=P2hEUIfkKYKk0QXppoHgCA&ved=0CEIQuAIwAg&q=manchester&usg=AFQjCNEBZOpSGbL3i-xMze45YxunEAhAag">
<div style="position:relative;top:-1px;left:0px">
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCABGAHgDASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAAAAUCAwQGAQf/xAA3EAABAwMCBAMGBQMFAQAAAAABAgMEAAUREiEGEzFBIlFhFDJxgaHR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O2tO3iBPf0ooofc6ObFxKxbdaX4zjqFDolWKKKKEqCZ0//9k=" alt="" id="vidthumb3" class="th vidthumb3" style="display:inline-block;height:70px;margin:0px 0px 0px 0px;border:0;width:120px" align="middle" border="0" height="70" width="120">
</div>
<span class="vdur" style="right:0;background-color:#000;bottom:0;color:#000;filter:alpha(opacity=70);font-size:11px;font-weight:bold;opacity:0.7;-khtml-opacity:0.7;-moz-opacity:0.7;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">► 5:53</span>
<span class="vdur" style="right:0;bottom:0;color:#fff;font-size:11px;font-weight:bold;padding:1px 3px;position:absolute;text-align:right;text-decoration:none">
with this code:
var html = document.getElementsByTagName("tr")[0].getElementsByTagName("td")[1].innerHTML
html = html.replace( /2012/g, "???" );
document.getElementsByTagName("tr")[0].getElementsByTagName("td")[1].innerHTML =html;
In this code i want to replace 2012 with ????
But I want to replace every number in the value by ??? but not replace the numbers in url.
Is that possible?

Since the URLs all use slash - in the URL you could do something like:
html = html.replace( /[^\-]2012/g, " ???" );

Related

What's an HTML code to change the width of an eBay page? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
This is the what the codes I already have looks like, but I want to set it to an exact width so everything looks neat:
I'm not very good with HTML and was hoping someone could tell me what to put where. Here's the code I have:
<p align="center">
<span style="color:#000080;"><span style="font-size:48px;"><span style="font-family:times new roman,times,serif;">Product Information</span></span>
</span>
</p>
<div>
<h2>
<span style="color:#000080;"><big><u><span style="background-color:#66ccff;">Description </span></u>
</big>
</span>
</h2>
</div>
<ul>
<li>
<span style="font-size:18px;">This is a 2016 Peyton Manning #18 Jersey.</span></li>
<li>
<span style="font-size:18px;">Team: Denver Broncos</span></li>
<li>
<span style="font-size:18px;">Player: Peyton Manning</span></li>
<li>
<span style="font-size:18px;">Color: Orange</span></li>
<li>
<span style="font-size:18px;">Brand: Nike</span></li>
<li>
<span style="font-size:18px;">This is a used item that has <u>NO</u> defects. No rips, tears, or stains.</span></li>
</ul>
<div>
<div>
<h2>
<span style="color: rgb(0, 0, 128);"><big><u><span style="background-color: rgb(102, 204, 255);">Size </span></u>
</big>
</span>
</h2>
</div>
<ul>
<li>
This is a Large/44 Jersey. These are the measurements:</li>
</ul>
</div>
<p align="center">
<img height="230" src="file:///C:/Users/JONATH~1.TOW/AppData/Local/Temp/msohtmlclip1/01/clip_image001.jpg" width="219"><img height="225" src="file:///C:/Users/JONATH~1.TOW/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg" width="225"></p>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="width:276px;" width="276">
<tbody>
<tr>
<td colspan="4" nowrap="nowrap" style="width:276px;height:20px;">
<p align="center">
Measurement Chart</p>
</td>
</tr>
<tr>
<td nowrap="nowrap" style="width:63px;height:20px;">
<p>
<strong>Country</strong></p>
</td>
<td nowrap="nowrap" style="width:75px;height:20px;">
<p>
Length</p>
</td>
<td nowrap="nowrap" style="width:66px;height:20px;">
<p>
Width</p>
</td>
<td nowrap="nowrap" style="width:72px;height:20px;">
<p>
Sleeves</p>
</td>
</tr>
<tr>
<td nowrap="nowrap" style="width:63px;height:20px;">
<p>
<strong>U.S.</strong></p>
</td>
<td nowrap="nowrap" style="width:75px;height:20px;">
<p>
</p>
</td>
<td nowrap="nowrap" style="width:66px;height:20px;">
<p>
</p>
</td>
<td nowrap="nowrap" style="width:72px;height:20px;">
<p>
</p>
</td>
</tr>
<tr>
<td nowrap="nowrap" style="width:63px;height:20px;">
<p>
<strong>Europe</strong></p>
</td>
<td nowrap="nowrap" style="width:75px;height:20px;">
<p>
</p>
</td>
<td nowrap="nowrap" style="width:66px;height:20px;">
<p>
</p>
</td>
<td nowrap="nowrap" style="width:72px;height:20px;">
<p>
</p>
</td>
</tr>
</tbody>
</table>
<div style="clear:both;">
</div>
<p>
</p>
<p align="center">
<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:18px;">If you want further details on the sizing, please feel free to message us!</span></span>
</p>
<div>
<div>
<h2>
<span style="color: rgb(0, 0, 128);"><big><u><span style="background-color: rgb(102, 204, 255);">Shipping </span></u>
</big>
</span>
</h2>
</div>
<ul>
</ul>
<p>
<span style="font-size:18px;">This item is shipped using USPS Priority Mail. It is shipped out of St. Paul, MN 55014.</span></p>
</div>
<div>
<br>
<span style="font-size:18px;">We try to ship this package within 24 hour of the time you pay for the item.<br>
We ship Internationally.</span></div>
<p>
<span style="font-size:18px;"><img src="http://thebuttonpost.com/wp-content/uploads/2014/07/priority-mail.png" style="margin-left: 12px; margin-right: 12px; float: right; width: 220px; height: 131px;"></span></p>
<div>
</div>
<p>
<span style="font-size:18px;"><u>The following is included in this shipment:</u></span></p>
<div>
<p>
<span style="font-size:18px;">1. 2-4 Day Shipping in the US</span></p>
<div>
<p>
<span style="font-size:18px;">2. Free Tracking</span></p>
<p>
<span style="font-size:18px;">3. Insurance for your package up to $50.00</span></p>
<div>
</div>
<p>
<span style="font-size:18px;">Please insure that your address is correct. If you are worried your package could be stolen please contact your Post Office with the tracking number and have them hold it there for you. Unfortunately once the tracking shows the package has been delivered to the address it is your responsibility and refunds cannot be accepted.</span></p>
<p>
<span style="font-size:18px;">If your package was damaged by USPS, please contact us ASAP with photos showing the extent of the damage. You will be refunded and we will take care of making an insurance claim with USPS since packaging was our responsibility.</span></p>
<p>
</p>
<div>
<div>
<h2>
<span style="color: rgb(0, 0, 128);"><big><u><span style="background-color: rgb(102, 204, 255);">Return Policy </span></u>
</big>
</span>
</h2>
</div>
<p>
<span style="font-size:18px;">We try to make the description of the item you’re buying as detailed as possible to avoid the need for returns. If your item contains a defect that was not listed in the description we will accept a return with photos of the defect. If the item’s defect is clearly not in the photos we posted, or seem to be manufactured, your return will not be accepted.</span></p>
</div>
<div>
<div>
<h2>
<span style="color: rgb(0, 0, 128);"><big><u><span style="background-color: rgb(102, 204, 255);">Payment </span></u>
</big>
</span>
</h2>
</div>
<p>
<span style="font-size:18px;">We accept PayPal and Credit/Debit cards. After you click “Purchase Item” you are not done checking out! Click on <u>PAY NOW</u>. Your package will not be shipped until you pay for your item, and it will be cancelled if you do not pay within 2 Business Days.</span></p>
</div>
<p align="center">
</p>
<p align="center">
</p>
<p style="text-align: center;">
<img alt="" src="http://www.bceldercare.ca/images/paypal-verified.png" style="width: 500px; height: 146px;"></p>
<p align="center">
</p>
</div>
</div>
<p>
</p>
I wouldn't recommend a fixed width. On mobile devices your template wont show very well. I would recommend you look a simple responsive grid css layout like skeleton - it will resize it all to the width of the browser, works fine in eBay!
How about putting your entire page in a container, giving that container a width of how big you want it to be and centering it. In my snippet, I gave the container a width of 50vw (Which equals to 50% of the current viewport width)
#container{
width:50vw;
display:block;
margin:0 auto;
}
<div id="container">
<p align="center">
<span style="color:#000080;"><span style="font-size:48px;"><span style="font-family:times new roman,times,serif;">Product Information</span></span></span></p>
<div>
<h2>
<span style="color:#000080;"><big><u><span style="background-color:#66ccff;">Description </span></u></big></span></h2>
</div>
<ul>
<li>
<span style="font-size:18px;">This is a 2016 Peyton Manning #18 Jersey.</span></li>
<li>
<span style="font-size:18px;">Team: Denver Broncos</span></li>
<li>
<span style="font-size:18px;">Player: Peyton Manning</span></li>
<li>
<span style="font-size:18px;">Color: Orange</span></li>
<li>
<span style="font-size:18px;">Brand: Nike</span></li>
<li>
<span style="font-size:18px;">This is a used item that has <u>NO</u> defects. No rips, tears, or stains.</span></li>
</ul>
<div>
<div>
<h2>
<span style="color: rgb(0, 0, 128);"><big><u><span style="background-color: rgb(102, 204, 255);">Size </span></u></big></span></h2>
</div>
<ul>
<li>
This is a Large/44 Jersey. These are the measurements:</li>
</ul>
</div>
<p align="center">
<img height="230" src="file:///C:/Users/JONATH~1.TOW/AppData/Local/Temp/msohtmlclip1/01/clip_image001.jpg" width="219"><img height="225" src="file:///C:/Users/JONATH~1.TOW/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg" width="225"></p>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="width:276px;" width="276">
<tbody>
<tr>
<td colspan="4" nowrap="nowrap" style="width:276px;height:20px;">
<p align="center">
Measurement Chart</p>
</td>
</tr>
<tr>
<td nowrap="nowrap" style="width:63px;height:20px;">
<p>
<strong>Country</strong></p>
</td>
<td nowrap="nowrap" style="width:75px;height:20px;">
<p>
Length</p>
</td>
<td nowrap="nowrap" style="width:66px;height:20px;">
<p>
Width</p>
</td>
<td nowrap="nowrap" style="width:72px;height:20px;">
<p>
Sleeves</p>
</td>
</tr>
<tr>
<td nowrap="nowrap" style="width:63px;height:20px;">
<p>
<strong>U.S.</strong></p>
</td>
<td nowrap="nowrap" style="width:75px;height:20px;">
<p>
</p>
</td>
<td nowrap="nowrap" style="width:66px;height:20px;">
<p>
</p>
</td>
<td nowrap="nowrap" style="width:72px;height:20px;">
<p>
</p>
</td>
</tr>
<tr>
<td nowrap="nowrap" style="width:63px;height:20px;">
<p>
<strong>Europe</strong></p>
</td>
<td nowrap="nowrap" style="width:75px;height:20px;">
<p>
</p>
</td>
<td nowrap="nowrap" style="width:66px;height:20px;">
<p>
</p>
</td>
<td nowrap="nowrap" style="width:72px;height:20px;">
<p>
</p>
</td>
</tr>
</tbody>
</table>
<div style="clear:both;">
</div>
<p>
</p>
<p align="center">
<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:18px;">If you want further details on the sizing, please feel free to message us!</span></span></p>
<div>
<div>
<h2>
<span style="color: rgb(0, 0, 128);"><big><u><span style="background-color: rgb(102, 204, 255);">Shipping </span></u></big></span></h2>
</div>
<ul>
</ul>
<p>
<span style="font-size:18px;">This item is shipped using USPS Priority Mail. It is shipped out of St. Paul, MN 55014.</span></p>
</div>
<div>
<br>
<span style="font-size:18px;">We try to ship this package within 24 hour of the time you pay for the item.<br>
We ship Internationally.</span></div>
<p>
<span style="font-size:18px;"><img src="http://thebuttonpost.com/wp-content/uploads/2014/07/priority-mail.png" style="margin-left: 12px; margin-right: 12px; float: right; width: 220px; height: 131px;"></span></p>
<div>
</div>
<p>
<span style="font-size:18px;"><u>The following is included in this shipment:</u></span></p>
<div>
<p>
<span style="font-size:18px;">1. 2-4 Day Shipping in the US</span></p>
<div>
<p>
<span style="font-size:18px;">2. Free Tracking</span></p>
<p>
<span style="font-size:18px;">3. Insurance for your package up to $50.00</span></p>
<div>
</div>
<p>
<span style="font-size:18px;">Please insure that your address is correct. If you are worried your package could be stolen please contact your Post Office with the tracking number and have them hold it there for you. Unfortunately once the tracking shows the package has been delivered to the address it is your responsibility and refunds cannot be accepted.</span></p>
<p>
<span style="font-size:18px;">If your package was damaged by USPS, please contact us ASAP with photos showing the extent of the damage. You will be refunded and we will take care of making an insurance claim with USPS since packaging was our responsibility.</span></p>
<p>
</p>
<div>
<div>
<h2>
<span style="color: rgb(0, 0, 128);"><big><u><span style="background-color: rgb(102, 204, 255);">Return Policy </span></u></big></span></h2>
</div>
<p>
<span style="font-size:18px;">We try to make the description of the item you’re buying as detailed as possible to avoid the need for returns. If your item contains a defect that was not listed in the description we will accept a return with photos of the defect. If the item’s defect is clearly not in the photos we posted, or seem to be manufactured, your return will not be accepted.</span></p>
</div>
<div>
<div>
<h2>
<span style="color: rgb(0, 0, 128);"><big><u><span style="background-color: rgb(102, 204, 255);">Payment </span></u></big></span></h2>
</div>
<p>
<span style="font-size:18px;">We accept PayPal and Credit/Debit cards. After you click “Purchase Item” you are not done checking out! Click on <u>PAY NOW</u>. Your package will not be shipped until you pay for your item, and it will be cancelled if you do not pay within 2 Business Days.</span></p>
</div>
<p align="center">
</p>
<p align="center">
</p>
<p style="text-align: center;">
<img alt="" src="http://www.bceldercare.ca/images/paypal-verified.png" style="width: 500px; height: 146px;"></p>
<p align="center">
</p>
</div>
</div>
<p>
</p>
</div>

Japanese Text not showing correctly

Currently I am working on a website which has some text in Japanese Language. All the texts are showing weird in all browser. The website has "charset" of "Shift_JIS". I have recoded the website with some new code as it was coded 10 years ago with some table like email template.
Here is the Head part of the site
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<title>コミックで英語を学ぶ,,漫画で学ぶ英語:, ESL, EFL, TOEFL, FCE, TOIEC, IELTS</title>
All the texts are looking like this
Here is all the code I have used in the page
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<title>コミックで英語を学ぶ,,漫画で学ぶ英語:, ESL, EFL, TOEFL, FCE, TOIEC, IELTS</title>
<script language="JavaScript">
<!--HPB_SCRIPT_ROV_50
//
// Licensed Materials - Property of IBM
// 83H7391, 42L1820
// (C) Copyright IBM Corp. 1995, 1999 All Rights Reserved.
//
// Version: 5.0.1
//
// HpbImgPreload: 画像のプリロードを行ないます
//
function HpbImgPreload()
{
var appVer=parseInt(navigator.appVersion);
var isNC=(document.layers && (appVer >= 4)); // Netscape Navigator 4.0 or later
var isIE=(document.all && (appVer >= 4)); // Internet Explorer 4.0 or later
if (isNC || isIE)
{
if (document.images)
{
var imgName = HpbImgPreload.arguments[0];
var cnt;
swImg[imgName] = new Array;
for (cnt = 1; cnt < HpbImgPreload.arguments.length; cnt++)
{
swImg[imgName][HpbImgPreload.arguments[cnt]] = new Image();
swImg[imgName][HpbImgPreload.arguments[cnt]].src = HpbImgPreload.arguments[cnt];
}
}
}
}
// HpbImgFind: Imageオブジェクトを探します
//
function HpbImgFind(doc, imgName)
{
for (var i=0; i < doc.layers.length; i++)
{
var img = doc.layers[i].document.images[imgName];
if (!img) img = HpbImgFind(doc.layers[i], imgName);
if (img) return img;
}
return null;
}
// HpbImgSwap: 画像を入れ換えます
//
function HpbImgSwap(imgName, imgSrc)
{
var appVer=parseInt(navigator.appVersion);
var isNC=(document.layers && (appVer >= 4)); // Netscape Navigator 4.0 or later
var isIE=(document.all && (appVer >= 4)); // Internet Explorer 4.0 or later
if (isNC || isIE)
{
if (document.images)
{
var img = document.images[imgName];
if (!img) img = HpbImgFind(document, imgName);
if (img) img.src = imgSrc;
}
}
}
var swImg; swImg=new Array;
//-->
</script><script language="JavaScript">
<!--
HPB_SCRIPT_PLD_50
HpbImgPreload('_HPB_ROLLOVER3', 'image/english02.gif', 'image/english01.gif');
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
TD {
font-size : 12px;
}
-->
</style>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body class="container-fluid">
<div class="header row">
<div class="col-md-3"></div>
<div class="col-md-6"><img src="banners/banner-cfangollll-flyguy600-105.png"></div>
<div class="col-md-3"></div>
</div>
<div class="middle row">
<div class="col-md-3"></div>
<div class="col-md-6" style="background:#fff">
<div class="top_sec_mid row">
<div class="top_text">
<h1 align="center"><br>
コミックデ英語学ぶ</h1>
<h1 align="center">世界コッミクで国際的なビジネス言語を勉強。</h1>
<h5 align="center"><br>
<b>Language Learning thru World Comics</b> </h5>
</div>
<!--top_text ends-->
<div class="top_txt2"> 英語を学ぶ人、そして教える人を対象とした、プリントOK、フォトフリーのお手
軽レッスン。難易度は中レベルで、初級編・中級編・上級編の3段階に別れてい
る。まずは下のタイトルをクリックしてみよう。 </div>
<div class="pdf">
<ul>
<li>
<div class="list_left col-md-9 col-sm-9"><img src="images/flag-icon_us.png" width="27" height="17">幻視少女(作:リー・ケネディ)</div>
<div class="list_right col-md-3 col-sm-3"><img src="image/p.gif" width="16" height="16" border="0" alt="pdf version">コミック</div>
</li>
<li>
<div class="list_left col-md-9 col-sm-9"><img src="images/flag-icon_Flag_of_England.png" width="27" height="17"> ルッキング(作:キャスパー・ウィリアムス)</div>
<div class="list_right col-md-3 col-sm-3"><img src="image/p.gif" width="16" height="16" border="0" alt="pdf version">コミック</div>
</li>
<li>
<div class="list_left col-md-9 col-sm-9"><img src="images/flag-icon_icon-denmark.png" width="27" height="17"> 冷や汗タラタラ(作:オーレ・コモル</div>
<div class="list_right col-md-3 col-sm-3"><img src="image/p.gif" width="16" height="16" border="0" alt="pdf version">コミック</div>
</li>
<li>
<div class="list_left col-md-9 col-sm-9"><img src="images/flag-icon_dutch.png" width="27" height="17"> ピート(作:マイケ・ハーチェス)</div>
<div class="list_right col-md-3 col-sm-3"><img src="image/p.gif" width="16" height="16" border="0" alt="pdf version">コミック</div>
</li>
<li>
<div class="list_left col-md-9 col-sm-9"><img src="images/flag-icon_germany-flag-icon.png" width="27" height="17"> 悪魔主義死神カルト(作:ウルリッチ・メイジン)</div>
<div class="list_right col-md-3 col-sm-3"><img src="image/p.gif" width="16" height="16" border="0" alt="pdf version">コミック</div>
</li>
<li>
<div class="list_left col-md-9 col-sm-9"><img src="images/flag-icon_Serbia Yugoslavia.png" width="27" height="17"> 夢見るセルビア人(作:アレクサンダー・ゾグラフ)</div>
<div class="list_right col-md-3 col-sm-3"><img src="image/p.gif" width="16" height="16" border="0" alt="pdf version">コミック</div>
</li>
</ul>
</div>
</div>
<!--top_sec_mid-->
<div class="mid_box_1">
<div class="mid_box1_img"><img src="alezog/serdre_02.gif" width="465" height="281"></div>
<div align="center" class="mid_box1_txt"> <strong>aleksandar zograf </strong><br>
(作:アレクサンダー・ゾグラフ)<br>
夢見るセルビア人 </div>
</div>
<!--mid_box_1 ends-->
<div class="mid_box_2">
<div class="mid_box2_img"><img src="olecom/olecomTOP.gif" width="431" height="306" alt=""></div>
<div align="center" class="mid_box2_txt"> <strong>ole comoll</strong><br>
I was hopelessly in love. I couldn't sleep, but lay think of her....Every day I came to see her, but all I dared to say to her was: "The usual please." It went on for some weeks until: "And here?" </div>
</div>
<!--mid_box_2 ends-->
<div class="mid_box_3">
<div class="mid_box3_img"><img src="caswil/look0203.gif" width="222" height="258" alt=""></div>
<div align="center " class="mid_box3_txt"> <strong> caspar williams</strong><br>
カスパーウィリアムズは、毎日の生活が何のためにあるのかということに全く確新が待ってない人々のために神経質な物語シリーズを書いている。Suburban Nightmare シリーズの中の LOOKING(ルキングか見ている)でもどちらかといえばふつうの状況にあるふつうの男が 神経質になっていく。Mr. Williams は<small><font face="MS ゴシック" lang="JA">ブ</font></small>ライトンで植物だけを友にひとりで住んでいる。 <strong>Click here for details on how to get your 6 bilingual comics and free sample Language Learning thru Comics Lesson</strong> </div>
</div>
<!--mid_box_3 ends-->
<div class="mid_box_4">
<div class="mid_box4_img"><img src="leeken22/02t_r2_c2_f2.gif" width="205" height="228" alt=""></div>
<div align="center " class="mid_box4_txt">
<p><strong>lee kennedy</strong><br>
幻視少女(作:リー・ケネディ</p>
<p><strong>Click here for details on how to get your 6 bilingual comics and free sample Language Learning thru Comics Lesson</strong></p>
</div>
</div>
<!--mid_box_4 ends-->
<div class="mid_box_5">
<div class="mid_box5_img"><img src="maahar22/maaful4.gif" width="241" height="332" alt=""></div>
<div align="center mid_box5_txt" class="mid_box5_txt"> <strong>maaike hartjes</strong><br>
この小さな物語は私の友人ピートについて,彼はいいやつですが、巨大な浮気者です。 <strong>Click here for details on how to get your 6 bilingual comics and free sample Language Learning thru Comics Lesson</strong> </div>
</div>
<!--mid_box_5 ends-->
<div class="mid_box_6">
<div class="mid_box6_img"><img src="ulrmag/ulrTOP.gif" width="425" height="367"></div>
<div align="center mid_box6_txt" class="mid_box6_txt">
<p>ulrich magin</p>
<p><strong>Click here for details on how to get your 6 bilingual comics and free sample Language Learning thru Comics Lesson</strong></p>
</div>
</div>
<!--mid_box_6 ends-->
<div class="mid_box_7">
<div class="mid_box7_img1 col-md-6"><img src="images/holocomics-template-FLATSURFACEVIEWnoLAYERS400traN.png" width="316" height="192"></div>
<div class="mid_box7_img2 col-md-6">
<div class="box7_txt">
<h5>xxxxxxxxxxxxxxxxxx</h5>
<h6>Click here for details on how to get your 6 bilingual comics and free sample Language Learning thru Comics Lesson</h6>
</div>
</div>
</div>
<!--mid_box_7 ends-->
<div class="bottom_blue row">
<div class="mid_box_8">
<div align="center" class="mid_box8_txt">
<p align="left">6部バイリンガルの漫画(アメリカ、ドイツ、オランダ、デンマーク、セルビア,英国から1つずつ、が無料で付いてきます。それぞれ単語と文法練習が付いたレッスンで物語を完全に理解し、イギリスとアメリカ英語で考え、話せるようになります。 </p>
<h6 align="left">What you get for free are 6 bilingual comics (one each from America, Serbia, Holland, Germany, Denmark and England). Each includes a complete lesson that will ensure that you know the story as well as how to think and talk about it in English. What are you waiting for?</h6>
</div>
<div class="mid_box8_img1"><img src="images/serdre-bilinguallastPage.png" width="600" height="354"></div>
</div>
<!--mid_box_8 ends-->
<div class="mid_box_9">
<table width="60%" border="2">
<tr>
<th height="372" bgcolor="#0066FF" scope="col"><h6 align="left">Maximizeyour your learning and memorization potential with three modes. Experience these comics and lessons thru your three main senses, </h6>
<h1 align="center">Listen See Feel</h1>
<p align="center">(auditory, visual and kinethetic) </p>
<p align="center">then </p>
<h1 align="center">Think and Create</h1>
<h6 align="left">(auditory, visual and kinethetic) </h6>
<table width="88%" border="0" align="center">
<tr>
<th height="42" scope="col"><img src="images/icon-movie2.jpg" width="40" height="40"></th>
<th scope="col"><img src="images/icon-text.jpg" width="40" height="40"></th>
<th scope="col"><img src="images/icon-voice.jpg" width="40" height="40"></th>
<th scope="col"><img src="images/icon-hear-2.jpg" width="40" height="40"></th>
<th scope="col"><img src="images/icon-comic40.jpg" width="40" height="40"></th>
<th scope="col"><img src="images/icon-slideshow.png" width="40" height="40"></th>
</tr>
</table>
<table width="88%" border="0" align="center">
<tr>
<th height="42" scope="col"><img src="images/image-blank-transparent40b.png" width="40" height="40"></th>
<th scope="col"><img src="images/image-blank-transparent40b.png" width="40" height="40"></th>
<th scope="col"><img src="images/icon-watch2.jpg" width="40" height="40"></th>
<th scope="col"><img src="images/icon-do.jpg" width="40" height="40"></th>
<th scope="col"><img src="images/image-blank-transparent40b.png" width="40" height="40"></th>
<th scope="col"><img src="images/image-blank-transparent40b.png" width="40" height="40"></th>
</tr>
</table>
<p align="left">Depending on what kind of learner you are (auditory, visual or kinesthetic), I believe it is best to 1) listen<img src="images/icon-hear-2.jpg" width="40" height="40">, 2)see <img src="images/icon-watch2.jpg" width="36" height="36"> and feel <img src="images/icon-do.jpg" width="40" height="40"> the comic and finally, 3) involve yourself in Creative Thinkingcheck out the translated version <img src="images/Flag_of_Japan_27.png" width="27" height="17"> <img src="images/icon-plus20.jpg" width="20" height="20"> <img src="images/flag-icon_british-flag.png" width="27" height="17">. You should then be ready for the lesson.</p>
<h6 align="center">All the audio is inEnglish in accents from various countries. </h6></th>
</tr>
</table>
</div>
<!--mid_box9-->
<div class="mid_box_10">
<table width="60%" border="2">
<tr>
<th scope="col"><div align="center">
<table width="60%" border="2">
<tr>
<th bgcolor="#FFFFFF" scope="col"><div align="center">
<p><img src="images/wordshoot.gif" alt="Language Learning Game " width="228" height="22"><br>
</p>
</div></th>
</tr>
</table>
<p><img src="images/worshoot-scrnsht.jpg" alt="Wordshoot: Language Learning Game" width="232" height="184"></p>
</div></th>
</tr>
</table>
</div>
<!--mid_box10-->
<div class="mid_box_11">
<h2 align="center" >(語学学習シューティング・ゲーム:TOIEC, TOEFL, IELTS, ケンブリッジ英検対策用)
100以上の問題&回答を収録。<br>
<br>
<strong>PC版:ここをクリック! MAC版:ここをクリック! </strong></h2>
<table width="100%" border="0" align="center">
<tr valign="top">
<td ><p align="center"> </p>
<p align="center" style="color:#fff;"><font face="Arial, Helvetica, sans-serif" size="1"><b>Language
Learning shoot 'em up for learners of TOIEC, TOEFL, IELTS et) </b></font></p>
<h6 align="center"><font face="Arial, Helvetica, sans-serif" size="3" color="#333333">A horde of illiterate, savage, grammatically-challenged and linguistically-dysfunctional
mutant aliens from a far off planet in an alternative dimension
want you for breakfast. Prevent this from happening by downloading this somewhat retro but still fun game.</font> <font face="Arial, Helvetica, sans-serif" size="3" color="#333333">Yummmy!</font></h6></td>
</tr>
</table>
</div>
<!--mid_box11-->
<div class="mid_box_12">
<table width="78%" border="2">
<tr>
<th bgcolor="#FFFFFF" scope="col"><div align="left">
<h2 style="color:#000">上のコミック好きだったら、きっと、あなたがこの南蛮画(ナンバンガ)23ヶ国、60
以上の漫画家の作品集大好きです。。。。<br>
</h2>
<h5 align="center" style="color:#000">If you like the comics above you'll love the works on the Nambanga Collection .</h5>
<div align="center">
<table width="80%" border="0">
<tr>
<th bgcolor="#3E8FD1" scope="col"><img src="images/nambangaFRONT.jpg" alt="xxxxxx" width="404" height="600" id="Image10"></th>
</tr>
</table>
<h2 align="left" style="color:#000">ここはアーティストやクリエイターのインクです(略歴も読めます!!)</h2>
<h5 align="center" style="color:#000">here is a link to a list of the artists and creators and short bios. </h5>
<h2 align="center" style="color:#000">★ ★ ★ 今だけ999円 ★ ★ ★</h2>
<p align="center"> </p>
<h2 align="center" style="color:#000">75%割引きです</h2>
<p align="center" style="color:#000">★ ★ ★ はいそうです ★ ★ ★</p>
<h2 align="center" style="color:#000">75%オフ</h2>
<h6 align="center" style="color:#000">Now only 750 yen (that's a 75% discount)</h6>
<p align="center"><img src="images/warning.png" width="60" height="60"></p>
<h2 align="center" style="color:#000">成人向けの漫画</h2>
<h2 align="left" style="color:#000">いくつかの物語を子どもたちにとって不適切であると考えていますよ。</h2>
<h5 align="left" style="color:#000">Some stories are suitable for a mature audience only!!!</h5>
<p align="center"><img src="images/banner-holoM-signmeUP-englishJP.jpg" alt="Lorem ipsum dolor..."></p>
</div>
<div align="center"></div>
</div>
<div align="center">
<table width="58%" border="2">
<tr>
<th scope="col"><div align="left">
<h2 style="color:#000">ホロミーム言語暗記システムは、英語学習が効率的になるだけでなく、スペイン語でも中国語でもフランス語でもどんな言語でもあなたが学びたい学習に役立ちます。</h2>
<h5 align="center"><img src="images/logo_header.jpg" width="289" height="86"></h5>
<h5 align="center">The Holo-MeME Language Memorization System will help you to learn not only ENGLISH faster and<br>
more efficiently but also Spanish, French, Chinese. In fact, whatever language you want to learn.<br>
</h5>
</div></th>
</tr>
</table>
</div></th>
</tr>
</table>
</div>
<!--mid_box12-->
<div class="mid_box_13"> <img src="banners/banner_nambanga-titlewithdilcar600only-60-20.jpg" width="600" height="74" id="Image25"> </div>
<!--mid_box13-->
</div>
</div>
<div class="col-md-3"></div>
</div>
<div class="footer row">
<p><img src="banners/banner-cfangollll-flyguyblack600-105.png" width="600" height="105">
<center>
<iframe src="footer.html" frameBorder="0" width="610" height="100"></iframe>
</center>
</p>
</div>
<style>
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
How can I fix that? Thanks
The problem, apparently, is that the encoding which you have declared (Shift_JIS) no longer matches the actual encoding used (probably UTF-8), and so the browser renders garbage. Either that, or your browser doesn't recognize the Shift_JIS encoding.
What may have happened is that when you edited the source, your text editor re-wrote the text in its preferred encoding, which differed from Shift_JIS. It's not possible to tell which encoding your current source file is in based on the code you posted; we'd need to have the raw file.
Another possibility is that your source is, in fact, encoded in Shift_JIS correctly, but your server is serving the page with a mis-matched Content-Type header which is overriding the <meta> tag.
In any case, I would recommend switching things entirely to UTF-8 where possible.
Try changing the declared charset of your page to UTF-8 (maybe add the modern <meta charset="utf-8"> tag while you're at it). If that doesn't work, try these steps:
Convert the original source to UTF-8
Open the original source in your editor
Ensure that the text displays properly in the editor (means the editor recognizes the encoding)
Use the editor's settings to re-save as UTF-8
Change the declared encoding to UTF-8
Apply your changes

Selenium modal Xpath can't Locate

I need to select this input
`(name="BtnOK" value="TAMAM" class="BoxButtonOK")`
with xpath after this modal popup. I can't use .FindByClass because there are same classes in the main page, but I need open which in (id="__LIGHTBOX__") modal, and when I use xpath sometimes it gives me error "cant locate element" and oddly sometimes it works.
Here is my code for xpath (and yes I already tried wait.until and no progress):
//div[contains(#id, 'LIGHTBOX')]//input[#name='BtnNext' and contains(#class, 'NavigationButtonNextLightBox')]
And here is modal:
<div id="__LIGHTBOX__" style="overflow: visible; padding: 0px; width: auto; min-height: 143px; max-height: none; height: auto;" class="ui-dialog-content ui-widget-content" >
<div class="__BOX__">
<input name="BtnClose" class="BoxButtonClose" type="button">
<div>
<img src="/Content/themes/base/images/popup-bg-top.png">
</div>
<div class="popupCapsule clearFix">
<div class="banner clearFix">
<h1 class="pageTitle">Fatura Ödeme</h1>
</div>
<div class="noteCapsulePopupContainer">
<div>
<img src="/Content/themes/base/images/note-capsule-top-success.png">
</div>
<div class="noteCapsulePopup">
<table>
<tbody>
<tr>
<td class="waitingTd"></td>
<td>
<p id="TransactionFlowNote">
<span>
<span class="important">10177202-1 (Beşyüzevler Şube)</span> adlı hesabımdan <span class="important">27,50 TL</span> tutarındaki <span class="important">5387373484</span> abone numarasına ait <span class="important">TURKCELL</span> faturası kurumuna iletildi, borcunuz kısa süre içerisinde tahsil edilecektir.
</span>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<img src="/Content/themes/base/images/note-capsule-sub.png">
</div>
</div>
<table class="popupButtonArea">
<tbody>
<tr>
<td class="left"></td>
<td class="right">
<input name="BtnSlip" value="DEKONT" class="popupOpenLink" style="margin-right: 5px;" href="/Slip/Index/201504220001012380000019284/" type="button"><input name="BtnPeopleAndPlaces" value="İŞLEMİ KAYDET" class="popupOpenLink ButtonWide2" style="margin-right: 5px;" href="/PeopleAndPlaces/SaveTransaction/201504220001012380000019284/1238/False" type="button">
<input name="BtnOK" value="TAMAM" class="BoxButtonOK" type="button">
</td>
</tr>
</tbody>
</table>
</div>
<div>
<img src="/Content/themes/base/images/popup-bg-sub.png">
</div>
</div>
Select by name:
WebElement btnNext = driver().findElement(By.name("BtnOK"));
Selected by Xpath
WebElement btnNext = driver().findElement(By.Xpath("//input[#name='BtnOK']"));

Using a Perl regex to print multi-line patterns from an HTML file

I have an HTML file. Here is a sample
<div class="criteria" style="padding-left:0;font-style:italic"> You searched for:
<span title="A*" >Individual: <span><b>A*</b></span></span>
</div>
</td>
</tr>
</table>
<table cellpadding="5" cellspacing="0" border="0" style="border-collapse: collapse; width: 100%">
<tr class="ListItemColorNew">
<td style="width:50%">
<div class="gvListItemStyle">
<span class="LargeText15">JAMES BOND A'MONEYPENNY </span> (LIC# 1111111)
<div class="GrayTextShade"><i>Alternate Names: BOND JAMES</i></div>
<div class="GrayTextShade">
GREY TIDE LLC (LIC# 2222)
</div>
</div>
</td>
<td style="width:50%">
<div class="gvListItemStyle">
<span class="LargeText15">FRANK WHITE A'SMALLS </span> (LIC# 1111111)
<div class="GrayTextShade"><i>Alternate Names: JAMES SMALLS</i></div>
<div class="GrayTextShade">
WEST RIVER CORP LLC (LIC# 3333)
</div>
</div>
</td>
<td style="width: 25%; vertical-align: top">
<div class="gvListItemStyle">
<div><img alt="help" src=\'/Content/images/BrokerCheck/icon-blueCheck.png\' style=\'vertical-align:top;padding-right:5px\' />Broker</div>
</div>
</td>
<td style="width:25%;text-align:right;vertical-align:top">
<div class="gvListItemStyle">
<a class="btn btn-primary" href="/Individual/Summary/5820616">Details »</a> </div>
</td>
</tr>
I'm trying to extract everything between <td style="width:50%"> and </td>. The data is stored in a file testFile.txt.
This is the Perl code I used
system("perl -pi.bak -e '/^<td style=\"width:50%\">.+<\\/td>/mg' testFile.txt";
Your below code isn't actually doing anything:
system("perl -pi.bak -e '/^<td style=\"width:50%\">.+<\\/td>/mg' testFile.txt");
You're matching m// in a void context with no captures, so the executed statement is meaningless.
Your pattern will never match your content because:
a. You're using the any character ., but it won't match newlines unless you use the /s Modifier.
b. You're using -p for line by line processing of the file, but your pattern would need to span lines in order to match.
The following demonstrates both a regex solution (not recommended) and using an actual HTML Parser, in this case Mojo::DOM. For a helpful 8 minute introductory video, check out Mojocast Episode 5
use strict;
use warnings;
use Mojo::DOM;
my $data = do { local $/; <DATA> };
# Regex Solution:
if ( $data =~ m{<td style="width:50%">(.*?)</td>}s ) {
print "Regex Solution:\n$1";
} else {
warn "No pattern match found";
}
# Parser Solution:
my $dom = Mojo::DOM->new($data);
my $yourtd = $dom->at(q{td[style="width:50%"]})->content;
print "\nMojo::DOM:\n", $yourtd;
__DATA__
<html>
<head>
<title>Hello World</title>
</head>
<body>
<table>
<tr>
</td>
<div class="criteria" style="padding-left:0;font-style:italic"> You searched for:
<span title="A*" >Individual: <span><b>A*</b></span></span>
</div>
</td>
</tr>
</table>
<table cellpadding="5" cellspacing="0" border="0" style="border-collapse: collapse; width: 100%">
<tr class="ListItemColorNew">
<td style="width:50%">
<div class="gvListItemStyle">
<span class="LargeText15">JAMES BOND A'MONEYPENNY </span> (LIC# 1111111)
<div class="GrayTextShade"><i>Alternate Names: BOND JAMES</i></div>
<div class="GrayTextShade">
GREY TIDE LLC (LIC# 2222)
</div>
</div>
</td>
<td style="width: 25%; vertical-align: top">
<div class="gvListItemStyle">
<div><img alt="help" src=\'/Content/images/BrokerCheck/icon-blueCheck.png\' style=\'vertical-align:top;padding-right:5px\' />Broker</div>
</div>
</td>
<td style="width:25%;text-align:right;vertical-align:top">
<div class="gvListItemStyle">
<a class="btn btn-primary" href="/Individual/Summary/5820616">Details »</a> </div>
</td>
</tr>
<table>
</body>
</html>
Outputs:
Regex Solution:
<div class="gvListItemStyle">
<span class="LargeText15">JAMES BOND A'MONEYPENNY </span> (LIC# 1111111)
<div class="GrayTextShade"><i>Alternate Names: BOND JAMES</i></div>
<div class="GrayTextShade">
GREY TIDE LLC (LIC# 2222)
</div>
</div>
Mojo::DOM:
<div class="gvListItemStyle">
<span class="LargeText15">JAMES BOND A'MONEYPENNY </span> (LIC# 1111111)
<div class="GrayTextShade"><i>Alternate Names: BOND JAMES</i></div>
<div class="GrayTextShade">
GREY TIDE LLC (LIC# 2222)
</div>
</div>
.*?(<td style="width:50%">((?!<\/td>).)*?<\/td>)
See demo.Use gs flags.
See demo.
http://regex101.com/r/oC3nN4/15
As said in the comments, remove the ^ in your regexp.
Also, use /s instead of /mg if you want to treat the file content as a single line string which allows '.' pattern to allow match new line characters '\n'.
/<td style=\"width:50%\">.+?<\\/td>/s
.+? while stop the matching at the first occurrence of </td>, not the last
I hope you've seen previous advice to avoid regexes to process HTML? It's really true! The only excuse I can think of for avoiding one of the several excellent HTML modules is that your data is so malformed that nothing else will process it.
Your "sample" of your HTML file is particularly unhelpful. Before I fixed the indentation the lines were scattered all over the place. After I looked at it I saw that it was the end of one table element followed by the start of another, so it left several elements unbalanced and either closed but not opened or vice-versa. Please don't do that to us.
I built a well-formed HTML file that contains your extract, and this is a program that will process it that uses HTML::TreeBuilder
use strict;
use warnings;
use HTML::TreeBuilder;
my $tree = HTML::TreeBuilder->new_from_file('html.html');
my #td50 = $tree->look_down(_tag => 'td', style => 'width:50%');
print $_->as_HTML('<>&', ' '), "\n\n" for #td50;
output
<td style="width:50%">
<div class="gvListItemStyle"><span class="LargeText15">JAMES BOND A'MONEYPENNY </span> (LIC# 1111111) <div class="GrayTextShade"><i>Alternate Names: BOND JAMES</i></div>
<div class="GrayTextShade"> GREY TIDE LLC (LIC# 2222) </div>
</div>
</td>
In case you or others need it, here's the HTML input document that I used
<html>
<body>
<table>
<tr>
<td>
<div class="criteria" style="padding-left:0;font-style:italic"> You searched for:
<span title="A*" >Individual: <span><b>A*</b></span></span>
</div>
</td>
</tr>
</table>
<table cellpadding="5" cellspacing="0" border="0" style="border-collapse: collapse; width: 100%">
<tr class="ListItemColorNew">
<td style="width:50%">
<div class="gvListItemStyle">
<span class="LargeText15">JAMES BOND A'MONEYPENNY </span> (LIC# 1111111)
<div class="GrayTextShade"><i>Alternate Names: BOND JAMES</i></div>
<div class="GrayTextShade">
GREY TIDE LLC (LIC# 2222)
</div>
</div>
</td>
<td style="width: 25%; vertical-align: top">
<div class="gvListItemStyle">
<div><img alt="help" src=\'/Content/images/BrokerCheck/icon-blueCheck.png\' style=\'vertical-align:top;padding-right:5px\' />Broker</div>
</div>
</td>
<td style="width:25%;text-align:right;vertical-align:top">
<div class="gvListItemStyle">
<a class="btn btn-primary" href="/Individual/Summary/5820616">Details »</a> </div>
</td>
</tr>
</table>
</body>
</html>

Why does page jump work in Internet Explorer but Mozilla Firefox?

I am using this code below, the "Click Here To View Warranty Details" link does a page jump down the page, which after uploading to ebay works in IE but not Mozilla, is there any code that I can place that will do a page jump that will work on all browsers?
Here is the live link (only on this item as a test)
http://www.ebay.com/itm/Metra-70-1002-1988-1996-Dodge-Jeep-In-Dash-Radio-Installation-Wire-Harness-/350683730934?MfcISAPICommand=ViewItem
Click Here To View Warranty Details </p>
<p style="text-align: center;"> </p>
<center>
<p class="pad"><b>Click to enlarge (Photos will open in a new window)</b><br />
##ITEM_IMAGES_HORT_M##</p>
</center>
<h3>Product Description</h3>
<div class="pad2">
<table style="border: black 1px solid;" cellpadding="3">
<tbody>
<tr>
<td>
<p>##ITEM_DESCRIPTION_HTML##</p>
<p><strong><span style="font-size: 24px;">Specifications: </span></strong></p>
<p>##ITEM_ATTRIBUTES##</p>
<p>##CUSTOM1## </p>
</td>
</tr>
</tbody>
</table>
</div>
<div id="listing-lower">
<h2 class="item_title"><img alt="" src="http://www.audiosavings.com/content/ebay/newtemplate/tru_policies.jpg" /></h2>
<div style="text-align: center;" id="infoTabs"><a id="infoTabs"><!-- tab 1 --></a><a name="shipping"></a>
<div id="tab1">
<ul class="tablinks">
<li><span>Shipping</span> </li>
<li>Payment </li>
<li>Return Policy </li>
<li>General Info </li>
<li>Intl. Shipping </li>
</ul>
<h4 class="tabtitle">Shipping</h4>
<ul class="tabinfo">
<ul class="tabinfo">
<li><strong><span style="color: #293d86;">Shipping is FREE!<br />
</span></strong>Free shipping to the 48 continental US is done with ##ITEM_DEFAULT_SHIPPING_METHOD_DESCRIPTION##<br />
- Orders Tues-Friday - Pay by 1:00 PM EST and get SAME DAY SHIPPING!<br />
- Orders Sat - Sunday - Ships Monday<br />
- Orders Monday - Ships Monday or Tuesday <br />
Your anchor for the policies should be
<a id="policies">
instead of the name attribute.
Edit
As Marc B mentionned: http://www.w3schools.com/tags/att_a_name.asp
Anchors are supposed to be id="" attributes, not name="".