NetTalk Central

Author Topic: Resetting a Comment but with a different visual...  (Read 6600 times)

robirenz

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Resetting a Comment but with a different visual...
« on: August 26, 2008, 05:57:37 AM »
I have an app where I need to use Checkboxes on a form..
I want to change the comment of that checkbox whenever I mark the checkbox so that it is bold or changes the background to another color.

Where do I have to do this..

I tried adding
loc:comment = '<span class="'&clip('formreadonly3')&'">'&clip(loc:comment)&'</span>'

at the accepted event of the checkbox. and it resets the comment field, but it just makes it disappear instead of the changing the appearance..

Something I'm missing...

Best Regards...

Roberto Renz

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Resetting a Comment but with a different visual...
« Reply #1 on: August 26, 2008, 11:43:34 AM »
Roberto, It's in the embed near Routines | 'Your Tab' | Field Name | 3 Value Routine, but it's the server side code. It's also accessible on that field by checking the "Send to server" box on the last tab and going to the server embed.

You also need to refresh the comment field by checking the updated field's Comment checkmark (that could also be the field you are checking).

Then you add your comment.

If I'm not clear, let me know. My computer is out of resources and I have to reboot, so I don't have access to Clarion right now.
Mike Grigsby
Credify Systems
Central Oregon, USA

robirenz

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Re: Resetting a Comment but with a different visual...
« Reply #2 on: August 26, 2008, 01:18:05 PM »
Mike,

the problem is that the CSS style is already done. 
So what I have done is add a variable that I can change the CSS name and so it will change and reset the comment. 
However when I change the Style and refresh then the browser sometimes does not stay on the same column.  At least in Firefox, Internet explorer works most of the time.  this CSS is really driving me crazy...
but I guess I will learn sooner or later....

Best Regards...

Roberto Renz

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Resetting a Comment but with a different visual...
« Reply #3 on: August 26, 2008, 07:14:16 PM »
What CSS element is giving you troubles?
Mike Grigsby
Credify Systems
Central Oregon, USA

robirenz

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Re: Resetting a Comment but with a different visual...
« Reply #4 on: August 27, 2008, 05:47:49 AM »
Mike,

Well, firefox will do some strange thing, but so will Internet Explorer.
f.e.  when you do a form and do not want it to stretch across the screen, you can phisically tell it the width of the form and the width of the 3 elements for the 3 columns.   however in firefox, it works, but in I.E. it won't respect the phisical form width that I give it.
I can't put an horizonal line to divide form fields becaus in I.E. it displays the horizonal line, but in Firefox it only show a dot in the prompt column of the form.
It's all probably CSS customization, but don't know enough of it to fix it.
I finally realized I need to  get rid of the all.gz since all the changes I would do to the all.css file weren't being taken into consideration, so that was a big boost once I found that...

Best Regards...

Roberto Renz

robirenz

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Re: Resetting a Comment but with a different visual...
« Reply #5 on: August 27, 2008, 07:10:33 AM »
Ok here is an example of something I am doing..
I have a button at the left of the screen with an image, ABCD, I tried just images and buttons and same kind of problem.  I click the button and in source embed I make it change the checkmark since it is really difficult to mark checkmarks, for some reason sometimes it does it and sometimes it does.  So when I click on the button I mark the checkmark and also change the style of the comment so that it turn bold.

The following screen are how they come out of Internet Explorer and Firefox.

My problem is that I don't know how I could fix the output in firefox, it will show correctly if the comment line does not pass one line but this test is 320 questions long and and most of them pass the one line.
Also it would be nice if I could center the comment and the checkmark vertically so that it would look nicer, but I also dont know how to do that...
Any help would be appreciated..

Best Regards...

Roberto Renz

[attachment deleted by admin]

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Resetting a Comment but with a different visual...
« Reply #6 on: August 27, 2008, 10:51:09 AM »
Okay, but you didn't say which elements you're using in your CSS to make the prompt on the right, or are you using the checkbox Prompt to hold the A, then the checkbox, then the comment holds the actual question?

If using CSS, what do you have for the class definition? I think you need to include the element:

vertical-align: middle;

in your CSS definition to cause it from wrapping all over the place, and that should work with IE and FF, but without knowing how you're implementing the check box or the CSS code, it's just a shot in the dark.
Mike Grigsby
Credify Systems
Central Oregon, USA

robirenz

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Re: Resetting a Comment but with a different visual...
« Reply #7 on: August 28, 2008, 06:11:38 AM »
Mike,

I'm just using a display field for the letter and I added a bitmap and created a button for the A, B, C, D. on the left.  I don't select the last on line, etc. so that I can continue on the same line
Next I add a filed from my diction which is a checkmark where I only display the value and the comment.  And I selec the last on line option so that the next things will appear on the next line

The display value I use the following CSS

.BotonABCD {
  width: 66px;
  height: 72px;
  margin: 3px 1px;
  font-family: Tahoma, Verdana,  Arial, Helvetica, sans-serif;
  font-size: 11px;
  cursor: hand;
  padding: 0px;
  text-align: center;
}

The checkmark and prompt I change between the following CSS
depending on whether the checkmark is on or off.

.formreadonly2 {
background-color: #FFFFFF;
font-size: medium;
padding-bottom: 12px;
}

.formreadonly3 {
background-color: #FFFFFF;
font-size: medium;
font-weight: bold;
padding-bottom: 13px;

}


Now I'm thinking maybe I should have some kind of table to keep the information together, but how do I integrate that into the the netwebform template...


Best Regards...

Roberto Renz