Go Around The Tech Corner…

Archive for October 2009

On my previous post about how to display alert messages, you’ll see that the messages are specified in quotes within the script. What if you wanted to display user-generated data on the alerts which pop up? How would you do that? You have to first display a form through which you will collect some information. Then in your JavaScript function, you have to call the values you get from the form so that it picks up and displays what the user enters. Here’s a simple example:

<title>Displaying user data in the alert messages</title>
<script language = "JavaScript">
function displayalert()
alert('Welcome ' + document.FORM1.yourname.value + 
'! Your Age is ' + document.FORM1.yourage.value)
Please Enter Your Name & Age in the textboxes Below, 
Then Click on 'Submit'...<p>
<form name = "FORM1">
Your Name: <input type="Text" Name="yourname"><p>
Your Age: &nbsp;&nbsp;<input Name="yourage"><p>
<input type="button" value="Submit" onClick="displayalert()"><p>
<input type="reset" value="Refresh">

The form [FORM1] collects the user’s name and age, and the JavaScript function displayalert() uses the document.FORM1.yourname.value to pick that value, which will be displayed in the alert. Notice that the JavaScript function to display the alert is being called from the Submit onClick property.

I hope this tutorial has been explained well, do leave comments on your opinions or if you think I should change something. Happy Programming!

–          Millie

When you click in a layer with the magic eraser tool, the tool automatically changes all similar pixels. If you’re working in the background or in a layer with locked transparency, the pixels change to the background color; otherwise, the pixels are erased to transparency. You can choose to erase contiguous pixels only or all similar pixels on the current layer.

magic eraser tool

To use the magic eraser tool:

  1. Select the magic eraser tool .

2. Do the following in the options bar:

Enter a tolerance value to define the range of colors that can be erased. A low tolerance erases pixels within a range of color values very similar to the pixel you click. A high tolerance erases pixels within a broader range.

Select Anti-aliased to smooth the edges of the area you erase.

Select Contiguous to erase only pixels contiguous to the one you click, or deselect to erase all similar pixels in the image.

Select Use All Layers to sample the erased color using combined data from all visible layers.

Specify opacity to define the strength of the erasure. Opacity of 100% erases pixels completely. A lower opacity erases pixels partially.

3. Click in the part of the layer you want to erase.

Note: This trick works well with PhotoShop Version 7.0.

I hope this post has been helpful. PhotoShop is an amazing software and once you know hwo to do a couple of things on it, you’ll definitely enjoy using it to change the look and feel of every picture!

– Millie

Often you’ll see messages popping up to alert you about something or to give you extra information on something. These can be programmed using JavaScript and it’s very simple. See the code below – It’s easy to understand.

<title>Displaying Alerts with JavaScript</title>
<script language = "JavaScript">
function m_alert()
alert('Do not Click..!!!');
alert('I Told You Not To Click Me..!!');
alert('Why Did You Click???!!!');
alert('You Will Never See Me Again!!!');
<a href="#" onMouseover = "m_alert()"> Dont Click This Link </a>

Simply copy the code above, paste it into a notepad file and save the file with a .html extension, e.g. alerts.html.

The link has a mouseover function which calls the JavaScript funtion when you hover it. When writing JavaScript code, always remember to end the lines of code with a semicolon (;). Try and see how it works! You can use alerts in your websites to pass on certain messages easily.

– Millie

The healing brush tool lets you correct imperfections, causing them to disappear into the surrounding image. Like the cloning tools, you use the healing brush tool to paint with sampled pixels from an image or pattern. However, the healing brush tool also matches the texture, lighting, and shading of the sampled pixels to the source pixels. As a result, the repaired pixels blend seamlessly into the rest of the image.

healing tool

To use the healing brush tool:

  1. Select the healing brush tool.Click the brush sample in the options bar and set brush options in the pop-up palette
  2. If you’re using a pressure-sensitive digitizing tablet, choose an option from the Size menu to vary the size of the healing brush over the course of a stroke. Choose Pen Pressure to base the variation on the pen pressure. Choose Stylus Wheel to base the variation on the position of the pen thumbwheel. Choose Off to not vary the size.
  3. Choose a blending mode from the Mode pop-up menu in the options bar: Choose Replace to preserve noise, film grain, and texture at the edges of the brush stroke.
  4. Choose a source to use for repairing pixels in the options bar: Sampled to use pixels from the current image, or Pattern to use pixels from a pattern. If you chose Pattern, select a pattern from the Pattern pop-up palette.
  5. Determine how you want to align the sampled pixels: If you select Aligned in the options bar, you can release the mouse button without losing the current sampling point. As a result, the sampled pixels are applied continuously, no matter how many times you stop and resume painting. If you deselect Aligned in the options bar, the sampled pixels are applied from the initial sampling point each time you stop and resume painting.
  6. For the healing brush tool in sampling mode, set the sampling point by positioning the pointer in any open image and Alt-clicking (Windows) or Option-clicking (Mac OS).

Note: If you are sampling from one image and applying to another, both images must be in the same color mode unless one of the images is in Grayscale mode.

Finally, drag in the image. The sampled pixels are melded with the existing pixels each time you release the mouse button. Look in the status bar to view the status of the melding process.

Also note that this trick works well in PhotoShop Version 7.0. Do you know how it works in the newer versions of PhotoShop?

– Millie

How would you carry out a successful search with Google? The Internet is a massive super information highway and you cannot even imagine the number of pages or the amount of information it carries. So if you’re looking for a specific thing, your search keyword also has to be specific.

Watch this video and learn some Google tricks that will help you with your search quests..

– Millie

Me – The author of this blog!

This is my tech blog. I got another blog, full of jokes that will crack u up! http://humoraddict.blogspot.com

Follow milliepatel84 on Twitter

Tweet Tweet…!!!!

Blog Stats

  • 44,637 hits

Top Clicks

  • None

Flickr Photos

%d bloggers like this: