Parse rightmost word in a cell:
=RIGHT(A1, LEN(A1)-FIND("*",SUBSTITUTE(A1," ", "*",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))
Parse location:
=MID(A2,FIND("Location: ",A2,1)+14,FIND("(",A2,FIND("Location: ",A2,1))-FIND("Location:
",A2,1)-14)
=MID(A2,FIND("Location: ",A2,1)+14,FIND("(",A2,FIND("Location: ",A2,1))-FIND("Location:
",A2,1)-14)
[ Number of characters: FIND("(",A2,FIND("Location: ",A2,1))-FIND("Location: ",A2,1)-15 ]
ParseName(fwd):
=PROPER(MID(A2,SEARCH("Name: ",A2,1)+6,SEARCH("Email:",A2,1)-(SEARCH("Name:",A2,1)+9)))
=PROPER(MID(A2,SEARCH("Name: ",A2,1)+6,SEARCH("Phone:",A2,1)-(SEARCH("Name:",A2,1)+8)))
ParseEmail:
=TRIM(LOWER(MID(A2,FIND("mailto:",A2,1)+7,(FIND("Home Location:
",A2,1))-(FIND("mailto:",A2,1)+9))))
=TRIM(LOWER(MID(A2,FIND("Email: ",A2,1)+8,(FIND("Phone: ",A2,1))-(FIND("Email:
",A2,1)+12))))
Concatenate middle and last names (& appellations):
=PROPER(TRIM(CONCATENATE(IF(LEN(C2)=1,C2&".",C2),IF(ISBLANK(D2),"","
"&D2),IF(ISBLANK(E2),""," "&E2),)))
=PROPER(TRIM(CONCATENATE(IF(LEN(C2)=1,C2&".",C2),IF(ISBLANK(D2),"","
"&D2),IF(ISBLANK(E2),""," "&E2),IF(ISBLANK(F2),""," "&F2))))
=PROPER(TRIM(CONCATENATE(IF(LEN(D2)=1,D2&".",D2),IF(ISBLANK(E2),"","
"&E2),IF(ISBLANK(F2),""," "&F2))))
=PROPER(TRIM(CONCATENATE(IF(LEN(E2)=1,E2&".",E2),IF(ISBLANK(F2),"","
"&F2),IF(ISBLANK(G2),""," "&G2))))
=PROPER(TRIM(CONCATENATE(IF(LEN(F2)=1,F2&".",F2),IF(ISBLANK(G2),"","
"&G2),IF(ISBLANK(H2),""," "&H2))))
=PROPER(TRIM(CONCATENATE(IF(LEN(F2)=1,F2&".",F2),IF(ISBLANK(G2),"","
"&G2),IF(ISBLANK(H2),""," "&H2),IF(ISBLANK(I2),""," "&I2))))
=PROPER(TRIM(CONCATENATE(IF(LEN(G2)=1,G2&".",G2),IF(ISBLANK(H2),"","
"&H2),IF(ISBLANK(I2),""," "&I2))))
=PROPER(TRIM(CONCATENATE(IF(LEN(G2)=1,G2&".",G2),IF(ISBLANK(H2),"","
"&H2),IF(ISBLANK(I2),""," "&I2),IF(ISBLANK(J2),""," "&J2))))
Parse location (in Body):
=MID(A2,FIND("Location: ",A2,1)+13,FIND("(",A2,FIND("Location: ",A2,1))-FIND("Location:
",A2,1)-14)
Parse location (in Subject):
=IF(SEARCH(" in ",A2,1),RIGHT(A2,LEN(A2)-SEARCH(" in ",A2,1)-3),)
=IF(SEARCH(" in ",C2,1),RIGHT(C2,LEN(C2)-SEARCH(" in ",C2,1)-3),)
=IF(SEARCH(" in ",D2,1),RIGHT(D2,LEN(D2)-SEARCH(" in ",D2,1)-3),)
=IF(SEARCH(" in ",C2,1),RIGHT(C2,LEN(C2)-SEARCH(" in ",C2,1)-3),IF(SEARCH(" for
",C2,1),RIGHT(C2,LEN(C2)-SEARCH(" for ",C2,1)-4),))
=IF(SEARCH(" in ",D2,1),RIGHT(D2,LEN(D2)-SEARCH(" in ",D2,1)-3),IF(SEARCH(" for
",D2,1),RIGHT(D2,LEN(D2)-SEARCH(" for ",D2,1)-4),))
-------------------------------------------------
Buttons from images
You totally CAN make an image into a button that loads a new page without JavaScript.
The usual reason for wanting to make an image into a button without using the usual link tags, i.e.,
Here's an alternative to having to define a JavaScript function for the onclick event:
- or -
Apply attributes using CSS:
#clickhere {
background-image: url('pathtoimage/image.png');
height: 20px;
width: 75px;
}
The usual reason for wanting to make an image into a button without using the usual link tags, i.e.,
Here's an alternative to having to define a JavaScript function for the onclick event:
- or -
onClick="location.href='index.html'">
Apply attributes using CSS:
#clickhere {
background-image: url('pathtoimage/image.png');
height: 20px;
width: 75px;
}
View Source Bookmarklet for iPhone
var sourceWindow = window.open("about:blank"); var newDoc = sourceWindow.document; newDoc.open(); newDoc.write("<html><head><title>Source of " + document.location.href + "</title><meta name=\"viewport\" id=\"viewport\" content=\"initial-scale=1.0;" + "user-scalable=0; maximum-scale=0.6667; width=480\"/><script>function do_onload()" + "{setTimeout(function(){window.scrollTo(0,1);},100);}if(navigator.userAgent.indexOf" + "(\"iPhone\")!=-1)window.onload=do_onload;</script></head><body></body></html>"); |
From Evernote: |
View Source BookmarkletClipped from: http://www.iphonewebdev.com/examples/ |
var sourceWindow = window.open("about:blank");var newDoc = sourceWindow.document; newDoc.open(); newDoc.write("<html><head><title>Source of " +document.location.href + "</title><meta name=\"viewport\" id=\"viewport\" content=\"initial-scale=1.0;" + "user-scalable=0; maximum-scale=0.6667; width=480\"/><script>function do_onload()" +"{setTimeout(function(){window.scrollTo(0,1);},100);}if(navigator.userAgent.indexOf"+ "(\"iPhone\")!=-1)window.onload=do_onload;</script></head><body></body></html>");
HTML and JavaScript for parsing E-mails and URLs
HTML part:
<textarea name="Block2" rows="20" cols="50"></textarea><br />
Enter a regular expression type:
<select name="re" onchange="parseWith()">
<option value="^\W" selected="selected">Choose an expression</option>
<option value="[\w\.\-]+@[\w\.\-]+\b">E-mails</option>
<option value="\w{3,6}:/+[\w.]*">URLs</option>
</select><br />
<option value="^\W" selected="selected">Choose an expression</option>
<option value="[\w\.\-]+@[\w\.\-]+\b">E-mails</option>
<option value="\w{3,6}:/+[\w.]*">URLs</option>
</select><br />
<form name="outform"><textarea name='result' rows='20' cols='50'></textarea></form>
JavaScript part:
function parseWith(){
var txtI = document.text2.Block2.value;
var re = document.text2.re.value;
var use = new RegExp(re,"g"); // RegExp constructor compiles entered value to a JavaScript valid regex
var txtO = txtI.match(use);
document.outform.result.value = txtO;
replaceCommas();
}
var txtI = document.text2.Block2.value;
var re = document.text2.re.value;
var use = new RegExp(re,"g"); // RegExp constructor compiles entered value to a JavaScript valid regex
var txtO = txtI.match(use);
document.outform.result.value = txtO;
replaceCommas();
}
function replaceCommas(){
var txt = document.outform.result.value;
var re = /,/g;
var rTxt = txt.replace(re,"\n");
document.outform.result.value = rTxt;
var para = document.getElementById("label");
para.lastChild.nodeValue = "";
para.lastChild.nodeValue = "paragraph separated values";
}
Subscribe to:
Posts (Atom)