Page 1 of 1

Checking links generated by JavaScript

Posted: Mon Aug 08, 2011 4:11 pm
by John Zeman
Hi Albert,

The recent discussions about link checking have prompted me to start one more thread about it. I sometimes use programs, often by Likno, to generate different kinds of JavaScript menus. An example of which can be seen at the link below where I'm using their Accordion Builder. The only problem I've had with these programs is CSE can't check the JavaScript code to verify the links are valid. Is there a current setting I could change or is this something that could be addressed in a future version?

Link to example page: http://www.visitwesterniowa.com/links.html

Thanks,

John

Re: Checking links generated by JavaScript

Posted: Mon Aug 08, 2011 4:53 pm
by Albert Wiersch
Hi John,

Sorry, there is currently no option or ability to check links that are constructed by running JavaScript code. It's always possible a solution could be implemented for a future version, but none is currently planned for v11.

You may want to check your menu builder program as it may implement its own link checker for the menus you build with it.

Re: Checking links generated by JavaScript

Posted: Mon Aug 08, 2011 5:36 pm
by John Zeman
Thanks Albert,

That's kind of what I thought. I did check and Likno doesn't have a link validator but I just thought of a kludge I can do to check the links with CSE another way.

FWIW I store all the links in a non JavaScript text file before I insert them into the JavaScript program. I can just copy and paste those links into a blank html document and have CSE check them that way.

John

Re: Checking links generated by JavaScript

Posted: Mon Aug 08, 2011 6:49 pm
by Albert Wiersch
John Zeman wrote:FWIW I store all the links in a non JavaScript text file before I insert them into the JavaScript program. I can just copy and paste those links into a blank html document and have CSE check them that way.
Hi John,

You can also check a list of links in CSE HTML Validator. Use this as the very first line in a text file of links:

Code: Select all

CSEJOBTYPELINKCHECKTEXTLIST
Then each line after that can be a link and CSE HTML Validator should check it.

Here's an example file with 3 links:

Code: Select all

CSEJOBTYPELINKCHECKTEXTLIST
https://www.htmlvalidator.com/
https://www.freehtmlvalidator.com/
https://www.cssvalidator.com/
Of course you could also do it they way you suggested - by linking to the links in a normal HTML document.

Re: Checking links generated by JavaScript

Posted: Mon Aug 08, 2011 7:20 pm
by John Zeman
Hey thanks for that Albert, I'll give that method a try tomorrow morning. :)

John

Re: Checking links generated by JavaScript

Posted: Sat Aug 20, 2011 9:56 am
by John Zeman
Hi again Albert,

I dredging this topic up again because I have a follow up question/feature request. After sending a text file of links to CSE which validates them, is there a way I can copy or somehow output the list of bad links to the clipboard or external file? That would be handy because then I could just send that list of bad URLs to my client who provides the URLs in the first place.

Thanks,

John

Re: Checking links generated by JavaScript

Posted: Sat Aug 20, 2011 12:27 pm
by Albert Wiersch
Hi John,

Do you mean something like Links->Export Links to Text from the Results Window's popup menu but that only shows the error/warning links? If so, then I can try to add this for the next major release.

Also, you may want to try the Batch Wizard and send the report to your client.

Re: Checking links generated by JavaScript

Posted: Sat Aug 20, 2011 1:20 pm
by John Zeman
Yes, that's exactly what I'd like Albert. :)

I'm afraid the majority of my clients wouldn't understand the results of a batch wizard report though. They depend upon me to break every single technical anything down into plain simple English for them. "You have a bad link, and this is it" they understand, anything beyond that they tend to ignore or send back to me for translation. lol

Thanks,

John

Re: Checking links generated by JavaScript

Posted: Sat Aug 20, 2011 3:00 pm
by Albert Wiersch
John Zeman wrote:Yes, that's exactly what I'd like Albert. :)
Great. I'll put that on my to-do list and see if I can get that in there. :D

UPDATE: Added for v11.
John Zeman wrote:I'm afraid the majority of my clients wouldn't understand the results of a batch wizard report though. They depend upon me to break every single technical anything down into plain simple English for them. "You have a bad link, and this is it" they understand, anything beyond that they tend to ignore or send back to me for translation. lol
If you check a text file of links with the Batch Wizard, then you should only get a link report, so they may be able to understand that easily.