Below is the code I'm using.
Essentially I need the values stored within the H1 tag based on the URL, I don't know how to get that value or if it has to be scraped.
FYI the url needed to retrieve h1 tag data can be considered a cross domain.
Little guide on the mechanics of the form.
- type model number in first box
second box retrieves the value within h1 tag
Image is shown based on which model number is typed in first box
Appreciate any and all kinds of help.
Thank You
Code:
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</head><body>
<form name="form1" method="post" action="">
<p>7-digit product#
<input type="text" name="model" id="model">
</p>
<p>
<label for="description">description</label>
<input type="text" name="description" id="description">
</p>
<p>
<input name="start" type="hidden" id="start" value="http://www.mysite.com/Products/">
</p>
<p>
<input name="end" type="hidden" id="end" value=".jpg">
</p>
<p><img name="proudctimage" src="=#start#model#end" width="32" height="32" alt=""></p>
</form>
<script>
var model_input = document.getElementById('model');
var start = document.getElementById('start');
var end = document.getElementById('end');
var image = document.getElementsByTagName('img');
model_input.onkeyup = function(e){
image[0].src = start.value + model_input.value + end.value; }
</script>
</body>
</html>