mac_shinobi Posted June 28, 2013 Posted June 28, 2013 Code in HTA : Test Application ID = "Test" APPLICATIONNAME = "Test" BORDER = "DIALOG" BORDERSTYLE = "NORMAL" CAPTION = "YES" CONTEXTMENU = "YES" ICON = "" INNERBORDER = "YES" MAXIMIZEBUTTON = "YES" MINIMIZEBUTTON = "YES" NAVIGABLE = "NO" SCROLL = "AUTO" SCROLLFLAT = "NO" SELECTION = "NO" SHOWINTASKBAR = "YES" SINGLEINSTANCE = "NO" SYSMENU = "YES" VERSION = "1.0" WINDOWSTATE = "NORMAL" /> <br /> Sub GetURL<br /> Dim MType, strSerial, strURL<br /> MType = Document.getElementById("MachineType").value<br /> strSerial = Document.getElementById("SerialNum").value<br /> <br /> strURL = "'http://support.lenovo.com/templatedata/Web%20Content/JSP/warrantyLookup.jsp?sysMachType=" + MType + "&sysSerial=" + strSerial + "'"<br /> <br /> document.getElementById("iwin").innerHTML = "<iframe width='100%' height='600' src=" + Trim(strURL) + ">"<br /> <br /> End Sub<br /> Machine Type : Serial Number : I keep getting an error message as per attached screen capture / grab : @Arthur, @Steve21 or anyone else Found the original URL to use from here : Lenovo Warranty Lookup with SCCM SQL Maybe the URL to lookup warranty info is wrong or I am missing something or my coding is totally wrong etc etc ??
Steve21 Posted June 30, 2013 Posted June 30, 2013 It's their website more than your script. There's a line that pulls the browser locale as a parameter, and that doesn't work properly in HTA, so it can't pull what language you're running, and thus whines. And there's no option within it for "nothing set" aka null. Don't think there's much you can do off hand, As the error is produced from their website, you can't disable the error showing in HTA, as it's effectively the webpage, not "Program". If you disable javascript errors I think it'll force that onto IE too as they use the same properties. Only way I can think of doing it would be removing the iframe, and pulling the individual elements of HTML you want. Or if you want the longer way, you could cheat and test the string you pull from the website, and just remove the crappy line that is breaking before posting it Steve
mac_shinobi Posted June 30, 2013 Author Posted June 30, 2013 Only way I can think of doing it would be removing the iframe, and pulling the individual elements of HTML you want. Or if you want the longer way, you could cheat and test the string you pull from the website, and just remove the crappy line that is breaking before posting it Steve No idea how to do either. Maybe just stick to opening there warranty site via a browser favourite / shortcut
Steve21 Posted June 30, 2013 Posted June 30, 2013 No idea how to do either. Maybe just stick to opening there warranty site via a browser favourite / shortcut If this is just for your own personal thing, you could always just disable javascript error reporting within IE. Assumed it was a deployment kind of thingy, which gets more issues Steve 1
mac_shinobi Posted July 1, 2013 Author Posted July 1, 2013 If this is just for your own personal thing, you could always just disable javascript error reporting within IE. Assumed it was a deployment kind of thingy, which gets more issues Steve Own project just for me to use, any idea which javascript options I need to disable in IE ( got version 10 of IE ). some screen grabs or how to get to the settings would be great Thanks @Steve21
Steve21 Posted July 1, 2013 Posted July 1, 2013 Own project just for me to use, any idea which javascript options I need to disable in IE ( got version 10 of IE ). some screen grabs or how to get to the settings would be great Thanks @Steve21 There is 2/3 I think depending on the version, but basically, IE options -> advanced -> Then there is disable script debugging, and display notification about every script error options. Think it should be those two. Steve
sted Posted July 1, 2013 Posted July 1, 2013 ooh this looks like the sort of thing i was going to look into over summer. I take it the idea is to programatically go through a list of computers and run their serial/model no's against in this case lenovos database to find out when the warranty expires then presumably dump it back to a spreadsheet/database table?
mac_shinobi Posted July 1, 2013 Author Posted July 1, 2013 ooh this looks like the sort of thing i was going to look into over summer. I take it the idea is to programatically go through a list of computers and run their serial/model no's against in this case lenovos database to find out when the warranty expires then presumably dump it back to a spreadsheet/database table? I was just trying to get it to do one machine for the time being but that is not a bad idea There is 2/3 I think depending on the version, but basically, IE options -> advanced -> Then there is disable script debugging, and display notification about every script error options. Think it should be those two. Steve Any chance of screen grab of what the settings need to look like as I have tried a few but still getting prompted with errors, also tried adjusting the meta tag type but then it does not load the web page, arrggghhhh
Steve21 Posted July 1, 2013 Posted July 1, 2013 I was just trying to get it to do one machine for the time being but that is not a bad idea Any chance of screen grab of what the settings need to look like as I have tried a few but still getting prompted with errors, also tried adjusting the meta tag type but then it does not load the web page, arrggghhhh Will try to if I get a minute, will need to find a spare machine to "unlockdown" Steve 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now