Click here to Skip to main content
       

Web Development

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: SMTP ProgrammingmemberDisIsHoody10 Dec '12 - 13:30 
Originally I thought that maybe it was because Port 25 is closed on my home router. However, if Port 25 was closed on my router would I still be able to connect while I'm on VPN?
GeneralRe: SMTP ProgrammingmvpRichard MacCutchan10 Dec '12 - 21:36 
It is unlikely that you can connect directly from home to your company server through normal internet, as most company exchange servers do not allow connections from outside their intranet. When you use VPN you are, presumably, going via the company's intranet and thus seen as a valid user.
One of these days I'm going to think of a really clever signature.

GeneralRe: SMTP ProgrammingmemberDisIsHoody11 Dec '12 - 9:40 
I'm not trying to connect to it so I can send an email through the server. What I was trying to understand how to do was to deliver and email to it. For example, if I build an SMTP server and a client which connects to my that SMTP server and I want to send an email to webmaster@mycompany.com (where mycompany.com is hosted on the Exchange server), how would the SMTP server I created connect to the Exchange server in order to deliver the email? Doesn't the Exchange server have to allow some sort of connection from outside the intranet in order to receive emails from other domains (gmail, yahoo, etc.)?
GeneralRe: SMTP ProgrammingmvpRichard MacCutchan11 Dec '12 - 10:26 
DisIsHoody wrote:
Doesn't the Exchange server have to allow some sort of connection from outside the intranet in order to receive emails
Yes, of course it does, but I cannot say why your attempt at connection was rejected. Maybe you should talk to your Exchange administrator for more details on what restrictions the server has.
One of these days I'm going to think of a really clever signature.

GeneralRe: SMTP ProgrammingmemberDisIsHoody11 Dec '12 - 10:44 
I'm going to have to try and do that, unfortunately the person who set it up is no longer with the company and we just have an outsourced IT company that maintains it and they usually aren't very help fully. However, because the web tools were able to connect to is it reasonable to assume the problem is on my end? I was thinking maybe because I dont have a domain name so if the Exchange server tries to lookup the IP address of my computer there is no MX or PTR record. Is this something SMTP servers look for?
 
I also found something that I dont know how to explain or how it may affect this. The MX record for the server list exchange.mycompany.com. However, even when I'm on VPN, I can't connect to the SMTP server using that address in telnet or the IP address it points to. I have to use remote.mycompany.com, which is shown in the SMTP banner and points to the SAME IP ADDRESS. Is there a setting in Exchange that makes it script only request coming from this address? If so, how do the online SMTP tools discover this subdomain when I only gave the tools the domain name (mycompany.com) and the MX record only shows exchange.mycompany.com? The address remote.mycomany.com is not located anywhere in the zone file.
GeneralRe: SMTP ProgrammingmvpRichard MacCutchan11 Dec '12 - 10:58 
I'm afraid you are getting deep into the Exchange server now, which is not something I have worked with.
One of these days I'm going to think of a really clever signature.

GeneralRe: SMTP ProgrammingmemberDisIsHoody11 Dec '12 - 11:20 
Okay thanks...I'm going to move this thread over to the Hosting/Server forum. Hopefully someone familiar with Exchange will be able to figure this out. I appreciate your help thus far.
QuestionXSLT Transforms - how to get just some of in a for-eachmemberQuickBooksDev8 Dec '12 - 2:26 
We use XSLT to convert various XML files into tab delimited.
 
Some of the XML input files have a variable number of options.   Sometimes none, others 1,2,3 or more.
 
This makes the formatting difficult since there is also a header row that is created in the XSLT file that must have the exact number of columns and proper header context.
 
So the question is how to get this formatted correctly since if we provide for 2 sets of opts (from the W3Schools tryit) in the header row how to get the for-each to stop at 2.
 
     <cd>
          &lt;title>Eros&lt;/title>
          <artist>Eros Ramazzotti</artist>
          <country>EU</country>
          <company>BMG</company>
          <price>9.90</price>
          <year>1997</year>
     </cd>
     <cd>
<opts length="3">
<opt><name>Nm1</name><val>111</val></opt>
<opt><name>Nm2</name><val>222</val></opt>
<opt><name>Nm3</name><val>333</val></opt>
 
</opts>
 
Typical for-each
<xsl:for-each select="opts/opt">
   <td><xsl:value-of select="name"/></td>
   <td><xsl:value-of select="val"/></td>
</xsl:for-each>
 
In this case there will be 3 sets of opts but 2 sets of headers and all data after this will be off.
 
Tried using xls:when test="@length =...' but don't see a way of just getting 2 of the 3 opts.
 
Can anyone help?
 
Thanks
AnswerRe: XSLT Transforms - how to get just some of in a for-eachmemberChris Grove13 Dec '12 - 19:46 
Hi,
not sure if this article will help but it might be worth a look, http://p2p.wrox.com/xslt/32423-sorting-limiting-each-top-most-recent.html[^]
 
You might be able to do something with position() as they are suggesting based on the number of headers ?
 
Hope this Helps
 
Chris
GeneralRe: XSLT Transforms - how to get just some of in a for-each [modified]memberQuickBooksDev17 Dec '12 - 0:42 
Thanks
 
Yes, using the Position() function did help but part 2 of this was still a lot more code that had to be added to complete what I needed to and I do not like it.
 
<b>How do we code for the mininum number of iternations when the input XML has less than the minimum?</b>
 
The Position did limit the output to the number of iterations we needed to see but it did nothing to fill in if the number of iterations was LESS that what we expected.
 
In our case the input XML had a length attribute.
<pre lang="xml">
<Opt length="1"><Opts>data</Opts></Opt></pre>
 
So we had to add a bunch of if or choose statements
<xls:if test="@length = "1">
...fill put in 4 output empty values
</xls:if>
<xls:if test="@length = "2">
...fill put in 3 output empty values
</xls:if>
 
Is there a better way?

-- modified 17 Dec '12 - 6:52.
GeneralRe: XSLT Transforms - how to get just some of in a for-eachmemberChris Grove17 Dec '12 - 3:43 
Hi,
I haven't done anything like this before but I did a quick bit of hunting around and something like this might do it for you. Please note this is totally untested and is just an idea. I thought about how to do a while or a normal for loop in XSL and then try and find away of checking if the element at position x existed. This is cobbled together from a couple of SO posts and my own take on how to put it together.
 
Sources:
http://stackoverflow.com/questions/11127693/how-to-do-a-while-like-loop-in-xslt[^]
http://stackoverflow.com/questions/5791053/xslt-if-tag-exists-apply-template-if-not-choose-static-value[^]
http://www.sourceware.org/ml/xsl-list/2000-08/msg01503.html[^]
 
From those articles this is what I have cobbled together:
<xsl:template name="for_loop">
	<xsl:param name="num">1</xsl:param> <!-- param has initial value of 1 -->
	<xsl:param name="limit"></xsl:param> <!-- this should be the expected number of opt elements, passed into the template -->
	<xsl:if test="not($num = $limit)">
		<xsl:choose>
			<xsl:when test="not(opt[position() = $num)"> <!-- true if the element DOES NOT exist -->
				<!-- create your empty xml here -->
			</xsl:when>
			<xsl:otherwise>
				<!-- the element exists get the data and output that -->
			</xsl:otherwise>
		</xsl:choose>
		<xsl:call-template name="for_loop">
			<xsl:with-param name="num">
				<xsl:value-of select="$num + 1">
			</xsl:with-param>
                        <xsl:with-param name="limit">
				<xsl:value-of select="$limit">
			</xsl:with-param>
		</xsl:call-template>
	</xsl:if>
</xsl:template>
 
Hope this helps.
 
Chris
GeneralRe: XSLT Transforms - how to get just some of in a for-eachmemberQuickBooksDev17 Dec '12 - 4:55 
Yes, I started to look at params and variables but with the complexity of the multiple templates I just could not get it to work. The XSLT is too big as it is and it was hard to put it all together.
 
I will have to re-look at it and perhaps test with a small XSLT until I can get the multi-templates and for loop template to work.
 
Thanks!
GeneralRe: XSLT Transforms - how to get just some of in a for-eachmemberChris Grove17 Dec '12 - 5:43 
Hi,
not sure if this is any help, I have used this to produce a student timetable grid. It does not do anything fancy at all, but it does use params and nested templates. It's quite old now and i'm sure it could be improved no end but it works well and might be of interest.
 
Chris
 
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html"/>
	<xsl:template match="/">
    
	<!-- root template -->
	<xsl:if test="pupil/details[count(.) != 0]">
      <h1>Week A</h1>
      <table class="ec-gridview" width="100%">
        <xsl:apply-templates select="pupil/details [@weekCode='A'][1]" mode="weekheader"/>
        <xsl:apply-templates select="pupil/details [@weekCode='A'][1]" mode="weekdata">
          <xsl:with-param name="week">A</xsl:with-param>
        </xsl:apply-templates>
      </table>
      <xsl:apply-templates select="pupil/details [@weekCode='A'][1]" mode="ott">
        <xsl:with-param name="week">A</xsl:with-param>
      </xsl:apply-templates>
      <br/>
      <h1>Week B</h1>
      <table class="ec-gridview" width="100%">
        <xsl:apply-templates select="pupil/details [@weekCode='B'][1]" mode="weekheader"/>
        <xsl:apply-templates select="pupil/details [@weekCode='B'][1]" mode="weekdata">
          <xsl:with-param name="week">B</xsl:with-param>
        </xsl:apply-templates>
      </table>
      <xsl:apply-templates select="pupil/details [@weekCode='B'][1]" mode="ott">
        <xsl:with-param name="week">B</xsl:with-param>
      </xsl:apply-templates>
    </xsl:if>
  </xsl:template>
  
  <!-- week data template -->
  <xsl:template match="details" mode="weekheader">
    <tr class="ec-gridrow-header">
      <th class="ec-gridheader" scope="col" style="width:5%;text-align:center"></th>
      <th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Mon</th>
      <th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Tue</th>
      <th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Wed</th>
      <th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Thu</th>
      <th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Fri</th>
      <th class="ec-gridheader" scope="col" style="width:16%;text-align:center">Sat</th>
    </tr>
  </xsl:template>
  
  <!-- week data template -->
  <xsl:template match="details" mode="weekdata">
    <xsl:param name="week"/>
        <!-- add the period data-->
        <tr class="ec-odd-line">
          <td class="ms-vb" style="vertical-align:text-top;text-align:center">
            <span class="ms-rteCustom-ArticleHeadLine">1</span>
          </td>
          <xsl:apply-templates select="//details[@lessonNumber='1' and @weekCode=$week]" mode="p1-6"/>
        </tr>
        <tr class="ec-even-line">
          <td class="ms-vb" style="vertical-align:text-top;text-align:center">
            <span class="ms-rteCustom-ArticleHeadLine">2</span>
          </td>
          <xsl:apply-templates select="//details[@lessonNumber='2' and @weekCode=$week]" mode="p1-6"/>
        </tr>
		<!-- Some code removed for brevity -->
	</xsl:template>
 
  <xsl:template match="details" mode="ott">
    <xsl:param name="week"/>
    <xsl:if test="count(//details [@lessonNumber > 299 and @weekCode=$week]) != 0">
      <h1 class="ms-rteCustom-ArticleHeadLine">Lessons not on the timetable</h1>
      <xsl:for-each select="//details [@lessonNumber > 299 and @weekCode=$week]">
        <a>
          <xsl:attribute name="href">
            ../Information/Set/SetLists.aspx?IsetCode=<xsl:value-of select="@setCode"/>
          </xsl:attribute>
          <xsl:value-of select="@setCode"/>
        </a> (<xsl:value-of select="@subjectName"/>) <xsl:value-of select="@description"/><br/>
      </xsl:for-each>
    </xsl:if>
  </xsl:template>
  
  
  
	<!--period data template-->
	<xsl:template match="details" mode="p1-6">
		<xsl:for-each select=".">
			<td style="vertical-align:text-top;text-align:center;min-height:60px;">
				<xsl:attribute name="class">
					<xsl:choose>
						<xsl:when test="@currentLesson = 'Y'">ms-vb-cp</xsl:when>
						<xsl:when test="@setCode = 'BLANK'">
							<xsl:choose>
								<xsl:when test ="@dayIndex = '1' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '2' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '3' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '4' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '5' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '6' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '8' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '9' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '10' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '11' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '12' and @lessonNumber = '6'">ms-vb-empty</xsl:when>
								<xsl:when test ="@dayIndex = '13' and (@lessonNumber = '5' or @lessonNumber = '6')">ms-vb-empty</xsl:when>
								<xsl:otherwise>ms-vb</xsl:otherwise>
							</xsl:choose>
						</xsl:when>
						<xsl:otherwise>ms-vb</xsl:otherwise>
					</xsl:choose>
				</xsl:attribute>
				<xsl:choose>
					<xsl:when test="@setCode != 'BLANK'">
						<xsl:value-of select="@subjectName"/>
						<br/>
						<a>
							<xsl:attribute name="href">
								../Information/Set/SetLists.aspx?IsetCode=<xsl:value-of select="@setCode"/>
							</xsl:attribute>
							<xsl:value-of select="@setCode"/>
						</a>
 
						<br/>
						<a>
							<xsl:attribute name="href">
								../Information/Room/RoomDetails.aspx?IroomCode=<xsl:value-of select="@room"/>
							</xsl:attribute>
							Room <xsl:value-of select="@room"/>
						</a>
						<br/>
						<xsl:for-each select="teacher">
							<xsl:value-of select="@teacher"/>
							<br/>
						</xsl:for-each>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text xml:space="preserve"> </xsl:text>
						<br/>
						<xsl:text xml:space="preserve"> </xsl:text>
						<br/>
						<xsl:text xml:space="preserve"> </xsl:text>
						<br/>
						<xsl:text xml:space="preserve"> </xsl:text>
						<br/>
					</xsl:otherwise>
				</xsl:choose>
			</td>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>

QuestionPop Up JQuery Quick LinkmemberJaniel Major5 Dec '12 - 22:02 
Hello, how do I design a pop up menu just like the one on www.list-of-companies.org when you click the country dropdown link.
 
I would actually prefer a solution that categorizes the link.
 
Thank you. Smile | :)
AnswerRe: Pop Up JQuery Quick Linkmembervbmike7 Dec '12 - 4:09 
From my experience this site is more for answering questions when you may encounter problems while you are doing the coding. You could probably find finished products at sites such as This or at sites such as here. Smile | :)
vbmike

AnswerRe: Pop Up JQuery Quick Linkmemberryanb3112 Dec '12 - 4:41 
http://jqueryui.com/[^] has lots of nice features. I would just google for jquery plugins that you want and find one that looks like it does what you want.
There are only 10 types of people in the world, those who understand binary and those who don't.

Question[HELP] Whois can using PHP to generate this one?memberjimmy.suharry4 Dec '12 - 21:37 
I've some data, there are
 
RealData Balance 	 Sort by Desc
A  684 	 345 		 A  684 
B  60 	 -   		 E  308 
C  -   	 -   		 J  302 
D  -   	 -   		 I  273 
E  308 	 - 		 O  178 
F  -   	 -   		 H  140 
G  11 	 -   		 B  60 
H  140 	 - 		 N  27 
I  273 	 - 		 Q  22 
J  302 	 -   		 R  20 
K  -   	 -   		 P  14 
L  -   	 -   		 G  11 
M  -   	 -   		 C  -   
N  27 	 -   		 D  -   
O  178 	 38 		 F  -   
P  14 	 -   		 K  -   
Q  22 	 -   		 L  -   
R  20 	 4   		 M  -   
 
Description
Proc = Process
Res = Result
Sort by Desc
 
Get 8 row data 														
Proc 1  Res 1 	Proc 2  Res 2 	Proc 3 	 Res 3 	 Proc 4  Res 4 	 Finish for 8 row data
A  684  657 	A  657  635 	A  635 	 621 	 A  621  610 	 A  610  	
E  308  281 	E  281  259 	E  259 	 245 	 E  245  234 	 E  234 	
J  302  275 	J  275  253 	J  253 	 239 	 J  239  228 	 J  228 	
I  273  246 	I  246  224 	I  224 	 210 	 I  210  199 	 I  199 	
O  178  151 	O  151  129 	O  129 	 115 	 O  115  104 	 O  104 	
H  140  113 	H  113  91 	H  91 	 77 	 H  77 	 66 	 H  66 	
B  60 	 33 	B  33 	11 	R  20 	 6 	 B  11 	 -   	 R  6 	
N  27 	 -   	Q  22 	-   	P  14 	 -   	 G  11 	 -   	 B  -   	
Q  22 	 22 	R  20 	20 	B  11 	 11 	 R  6 	 6 	 G  -   	
R  20 	 20 	P  14 	14 	G  11 	 11 	 P  -    -   	 P  -   	
P  14 	 14 	G  11 	11 	Q  -   	 -   	 Q  -    -   	 Q  -   	
G  11 	 11 	N  -    -   	N  -   	 -   	 N  -    -   	 N  -   	
C  -    -   	C  -    -   	C  -   	 -   	 C  -    -   	 C  -   	
D  -    -   	D  -    -   	D  -   	 -   	 D  -    -   	 D  -   	
F  -    -   	F  -    -   	F  -   	 -   	 F  -    -   	 F  -   	
K  -    -   	K  -    -   	K  -   	 -   	 K  -    -   	 K  -   	
L  -    -   	L  -    -   	L  -   	 -   	 L  -    -   	 L  -   	
M  -    -   	M  -    -   	M  -   	 -   	 M  -    -   	 M  -   	
 
Result 	 1 	 27 
Result 	 2 	 22 
Result 	 3 	 14 
Result 	 4 	 11 
 
Total 1		 74 (For 8 row data)
 

 
Get 4 row data 														
Proc 1 	 Res 1 	 Proc 2  Res 2 	 Proc 3  Res 3 	 Finish for 4 row data
A  610 	 411 	 A  411  376 	 A  376  347 	 A  347  345 
E  234 	 35 	 O  104  69 	 O  69 	 40 	 O  40 	 38 
J  228 	 29 	 H  66 	 31 	 H  31 	 2 	 R  6 	 4 
I  199 	 -   	 E  35 	 -   	 J  29 	 -   	 H  2 	 -   
O  104 	 104 	 J  29 	 29 	 R  6 	 6 	 J  -    -   
H  66 	 66 	 R  6 	 6 	 E  -    -   	 E  -    -   
R  6 	 6 	 I  -    -   	 I  -    -   	 I  -    -   
B  -   	 -   	 B  -    -   	 B  -    -   	 B  -    -   
G  -   	 -   	 G  -    -   	 G  -    -   	 G  -    -   
P  -   	 -   	 P  -    -   	 P  -    -   	 P  -    -   
Q  -   	 -   	 Q  -    -   	 Q  -    -   	 Q  -    -   
N  -   	 -   	 N  -    -   	 N  -    -   	 N  -    -   
C  -   	 -   	 C  -    -   	 C  -    -   	 C  -    -   
D  -   	 -   	 D  -    -   	 D  -    -   	 D  -    -   
F  -   	 -   	 F  -    -   	 F  -    -   	 F  -    -   
K  -   	 -   	 K  -    -   	 K  -    -   	 K  -    -   
L  -   	 -   	 L  -    -   	 L  -    -   	 L  -    -   
M  -   	 -   	 M  -    -   	 M  -    -   	 M  -    -   
 
Result 	 1 	 199 
Result 	 2 	 35 
Result 	 3 	 29 
Result 	 4 	 2 
		
Total 2 	 265 (For 4 row data)
 

 
How to get this data using Query or Function? And how to using in PHP?
Please help!
 
Thank you.
Jimmy
AnswerRe: [HELP] Whois can using PHP to generate this one?memberS.M. Zamshed Farhan12 Jan '13 - 5:54 
From where you got it?
QuestionTool for big WEB project with huge loadsmemberJunoli2 Dec '12 - 9:37 
Can you advise me what web technologies must use for developing huge Web projects, what frameworks maybe? I want to see all picture elements the future developing system
Now i know only: PHP, CSS, HTML, JavaScript, Jquery, Codeigniter/
AnswerRe: Tool for big WEB project with huge loadsmemberRichard A. Abbott2 Dec '12 - 10:47 
Some of the biggest web sites use PHP/MySQL, some use CodeIgniter as a MVC solution when developing PHP/MySQL solutions. Some use WordPress, which incidentally is PHP/MySQL.
 
Other websites use ASP.NET with some flavour of SQL Server.
 
Other solutions include JSP.
 
But a Google search can deliver to you much more information than I can in a single reply.
Questionselect an item in gridviewmemberptvce2 Dec '12 - 1:50 
I have a gridview with a checkbox column, i select a checkbox in a row and click edit button after that, edit button click_event i wrote this:
 
grvWorkDetail.DataKeys[grvWorkDetail.SelectedIndex].Values["WorkTimeID"].ToString()
 
but it has error, and i cant access to "WorkTimeID"
 
my codebehind is :
 
<asp:TemplateField ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center">
                                                            <HeaderTemplate>
                                                                <asp:CheckBox ID="chk_SelectAll" runat="server" />
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chk_Select" runat="server" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center"

AnswerRe: select an item in gridviewmvpRichard MacCutchan2 Dec '12 - 3:00 
Please do not post the same question in multiple forums.
One of these days I'm going to think of a really clever signature.

Questioni php questionmembergamaan1 Dec '12 - 4:00 
how to upload (.flv)file using php
please help me
i try use $_files['file']['type']
but i have problem in this kind of extension only
thank you.
AnswerRe: i php questionmembergamaan1 Dec '12 - 4:03 
please help me i am wait for answer
AnswerRe: i php questionmemberS.M. Zamshed Farhan12 Jan '13 - 6:03 
move_uploaded_file($_FILES["fileAttach"]['tmp_name'], $orgFilename) - did you test it?

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 18 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid