Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Monday, 11 November 2013

Selecting Colors Using Microsoft FrontPage 2003

When designing a web page, sometimes you want to copy and use a specific color in an existing web site. But the problem is you don’t know what the exact color is. In this case, you can use Microsoft FrontPage 2003 to select colors by their values.

Here are the steps to follow:

1. Open the web site, picture or other file that has the color that you want to copy.

2. Open the Microsoft FrontPage and resize it to smaller window. Be sure that the FrontPage window is on the top of the page in step #1.

3. On the Formatting toolbar, click the next  to FONT COLOR   » select More Colors...
The More Colors dialog box appears.

More Colors


4. Click the Select button and then point your mouse (outside the More Colors dialog box) to the color that you want to copy or reuse. (In our example, the color of the yahoo page toolbar has been selected.)



5. Copy the hex value in the Value text box and then modify it in the format #XXXXXX.
(e.g. {F6,E8,A9} -> #F6E8A9 ). From this format, you can now use it in your web page design.




 

Thursday, 7 November 2013

Change the Redirection URL of SharePoint Buttons

When you open a site using SharePoint designer and view one of its site pages, for example EditForm.aspx, you can see the html code of the default OK and Cancel buttons in the HTML Code view. 

The html code of the buttons are:

<SharePoint:SaveButton runat="server" ControlMode="Edit" id="savebutton1" Text="OK"/>

<SharePoint:GoBackButton runat="server" ControlMode="Edit" id="gobackbutton2"/>


In the above html code, you will notice that there are no available attributes / properties for the elements <SharePoint:SaveButton> and <SharePoint:GoBackButton> where you can specify or edit its redirection url. Basically, the redirection url of these buttons are being handled already by SharePoint so there is no way to make the default buttons redirect to a different url.

But there is a workaround to achieve that kind of requirement. Instead of using the default sharepoint buttons, you can use the HTML button <input type="button"> as shown below.

<input type="button" class="ms-ButtonHeightWidth" value="OK" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={}')}" />

<input type="button" class="ms-ButtonHeightWidth" value="Cancel" name="btnCancel" onclick="javascript: {ddwrt:GenFireServerEvent('__redirect={}')}" />


Here we set the class attribute equal to "ms-ButtonHeightWidth" in order to have the same look and feel as of the default SharePoint button. In the __redirect={} part of the onclick attribute value, you can put any URL you like, for example __redirect={http://www.google.com} or __redirect={/news/PressReleases/}. Please take note that there should be no quotes around the URLs passed into the __redirect directive.


Here is the full example:

<input type="button" class="ms-ButtonHeightWidth" value="OK" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={http://www.google.com}')}" />

<input type="button" class="ms-ButtonHeightWidth" value="Cancel" name="btnCancel" onclick="javascript: {ddwrt:GenFireServerEvent('__redirect={/news/PressReleases/}')}" />