Reloading "WB Source" window?

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
jgarbers
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 3
Joined: Fri Jan 14, 2005 3:13 pm

Reloading "WB Source" window?

Post by jgarbers » Fri Jan 14, 2005 3:30 pm

I'm enjoying using CSE, but have run into a bit of a snag - maybe there's an easy workaround. I'm trying to validate a page that's the result of a POST. When using CSE's built-in browser, I go to the form page; the form page's HTML loads in the "WB Source" window and I can validate it. However, when I post the result, "WB Source" doesn't change - so if I click "Validate", I"m still validating the form, not the result of the posted form.

I've found a workaround - if I Ctrl-W to close the "WB Source" window before submitting the form, I get the posted result, but it's easy to forget to do that before clicking "Submit". Is there a way to update "WB Source" to reflect the page that's currently displayed in the built-in browser window?
Thanks!

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3407
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Reloading "WB Source" window?

Post by Albert Wiersch » Sat Jan 15, 2005 9:28 am

Hello,

The WB Source should change and show the result of the posted form. The only thing I can think of when this might not happen is if for some reason the page cannot be completely loaded. Do you have any images or any external links to graphics that are not loading in the results page? This could be causing the problem, since the WB Source will not be updated until the page is fully finished loading. You could also try hitting the stop button in the built-in browser.

Also, make sure the browser is NOT in preview mode when using the browser in this way. And make sure you are using the latest version - v6.53.

If this doesn't help, would I be able to try to reproduce this issue myself? Can you give me the steps to try to reproduce this (what URL?)?
Image
Albert Wiersch

jgarbers
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 3
Joined: Fri Jan 14, 2005 3:13 pm

Post by jgarbers » Sat Jan 15, 2005 9:46 pm

Ah, thanks for your reply - now that I know it should work, I think I have an idea as to why it doesn't in my case. I have a "dual-mode" page - call it "signup.php" - that POSTs to itself. That is, the PHP code for the page generates different HTML based on whether the retrieval method is GET or POST.

Since the "result" page has the same URL as the original page, I have a feeling that CSE doesn't realize anything has changed - and doesn't "feel the need" to re-load the "WB Source" window.

I'm pretty new to PHP, so I'm not sure if this is a typical approach; it seems reasonable, though, for a form that needs validation (and would present the form again with various errors if there was a problem with the posted input).

Suggestions? Thanks!

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3407
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Post by Albert Wiersch » Sun Jan 16, 2005 5:17 pm

Hello,

Your logic is good, but that's not the way CSE works. CSE updates the WB Source tab when it receives a document complete event from the browser.

I have a form that works like you say, it uses the same URL. I checked CSE with this and it worked fine. It refreshed the page correctly, even though it was the same URL.

When you submit your form, does the red stop button (with the red square) get grayed out when the page finishes loading? If it doesn't, then something on that page is causing it not to finish and that could be the problem.

What version of CSE are you using? It is possible, but unlikely, that this could be the issue.

Is the URL that you are having a problem with publically accessible so that I could try to reproduce the problem in the same way that you are?
Image
Albert Wiersch

jgarbers
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 3
Joined: Fri Jan 14, 2005 3:13 pm

Post by jgarbers » Mon Jan 17, 2005 9:02 am

Well, your problem suppression field seems to work well at a distance! I can't reproduce the problem any more. Only thing I can think of was that I had some error in my code at one point that was resulting in an incomplete document being sent (?) - or, perhaps, that the first hundred lines of the HTML being sent were so similar that I didn't notice that the page had changed. Sorry to waste your time on this one, but thanks for a great product!

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3407
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Post by Albert Wiersch » Mon Jan 17, 2005 9:17 am

Great, I'm glad it's working! I think it may have been that you didn't notice as I had been confused by this before as well. If the page is much the same, it's hard to notice a difference. However, if you have auto validate on, then CSE should automatically validate the page when it is done loading and you'll know it's changed (especially if you have sound enabled). To enable this, check "When not in preview mode, automatically validate the web browser source" option in the General 2 tab in the Editor Options.
Image
Albert Wiersch

Post Reply