NetTalk Central

Author Topic: Buttons broken?  (Read 3735 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Buttons broken?
« on: May 27, 2013, 01:52:00 AM »

Hi,

Something out of kilter with my buttons.

All buttons (except save and cancel) all go to the IndexPage.
Embed code does not execute,
a button that calls a procedure,
seems as if any type of action is ignored and all go to the indexpage.

TIA for any ideas on this.

Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Buttons broken?
« Reply #1 on: May 27, 2013, 04:25:58 AM »
more info needed methinks....

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Buttons broken?
« Reply #2 on: May 27, 2013, 12:05:41 PM »
Hi Bruce

Below the HTML between the app that works and the one with the problem.

button type seems to be the problem, blank in the problem app.
I have tried to change the type, generate, and then change it back. Same issue.
These are buttons in procedures that used to work fine, somewhere I must have tweked something that causes it to generates a blank button type.
I have also changed to buttom type "submit", same problem.

works
<div id="signin_new_user_btn_value_div"  class="nt-form-div">        <button type="button" name="new_user" id="new_userzLpj" value="New? Register here" onclick="location.href='SignInNewUser?&amp;PressedButton='" >New? Register here</button>

problem
<div id="signin_new_user_btn_value_div"  class="nt-form-div nt-left"><button type="" name="new_user" id="new_userzt4R" value="New? Register here" onclick="location.href='SignInNewUser?&amp;PressedButton='" >New? Register here</button>

Will keep checking and trying to understand where it's going wrong
Any ideas appreciated

Johan



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Buttons broken?
« Reply #3 on: May 27, 2013, 09:30:15 PM »
I've looked through the code and I'm not seeing a way for a button to be created with a blank type. The Submit test is expected - indeed clearly the "default" value for type is "submit" as far as HTML is concerned.

If you look at your generated source, you should see a call to p_web.CreateButton that creates the button itself. The first parameter of that should be "button". Let me know if it is. If not we investigate the template, if it is we need to investigate the CreateButton method.

I'm assuming there's nothing in the CreateButton method in your WebHandler procedure.

cheers
Bruce

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Buttons broken?
« Reply #4 on: May 28, 2013, 02:30:08 AM »

Hi Bruce

Thanks for that.

Found something strange and have checked this at least 3 times.

If I add a comment in the "CreateButton method" then it does not generate correctly.
Remove the comment, and all is fine.

The "duh, it's obvious " code was in there, and to remove it I commented it out.
Clearly not enough, no idea why though.
Seems the embed has to be empty.

So icons are back, and buttons working.
Still would be nice to remove them sometime, but not top of the current list.

thanks

Johan




Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Buttons broken?
« Reply #5 on: May 28, 2013, 02:51:26 AM »
argh....
in \accessory\libsrc\win\netweb.inc
look for the CreateButton method declaration.
There are 2 parameter there named the same (tp)
change the second one to tip.

this'll be fixed in 7.11 obviously.

cheers
Bruce